attempts at making wxSocket work with wxBase - it doesn't work but
already compiles :-| git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -322,18 +322,18 @@ extern bool WXDLLEXPORT wxYield();
|
||||
// Yield to other apps/messages
|
||||
extern void WXDLLEXPORT wxWakeUpIdle();
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
// Post a message to the given eventhandler which will be processed during the
|
||||
// next event loop iteration
|
||||
inline void WXDLLEXPORT wxPostEvent(wxEvtHandler *dest, wxEvent& event)
|
||||
{
|
||||
wxCHECK_RET( dest, wxT("need an object to post event to in wxPostEvent") );
|
||||
|
||||
#if wxUSE_GUI
|
||||
dest->AddPendingEvent(event);
|
||||
}
|
||||
|
||||
#else
|
||||
dest->ProcessEvent(event);
|
||||
#endif // wxUSE_GUI
|
||||
}
|
||||
|
||||
// console applications may avoid using DECLARE_APP and IMPLEMENT_APP macros
|
||||
// and call these functions instead at the program startup and termination
|
||||
|
@@ -117,6 +117,8 @@ protected:
|
||||
void DoShowModal();
|
||||
|
||||
private:
|
||||
wxWindow *m_oldFocus;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
@@ -22,6 +22,8 @@
|
||||
#include "wx/longlong.h"
|
||||
#include "wx/event.h"
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTimer
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -121,6 +123,37 @@ protected:
|
||||
#include "wx/stubs/timer.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTimerRunner: starts the timer in its ctor, stops in the dtor
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT 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;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTimerEvent
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -148,6 +181,8 @@ typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
|
||||
|
||||
#define EVT_TIMER(id, func) { wxEVT_TIMER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTimerEventFunction) & func, NULL},
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxStopWatch: measure time intervals with up to 1ms resolution
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user