the top window.
-\membersection{wxApp::Initialized}\label{wxappinitialized}
-
-\func{bool}{Initialized}{\void}
-
-Returns true if the application has been initialized (i.e. if\rtfsp
-\helpref{wxApp::OnInit}{wxapponinit} has returned successfully). This can be useful for error
-message routines to determine which method of output is best for the
-current state of the program (some windowing systems may not like
-dialogs to pop up before the main loop has been entered).
-
-
\membersection{wxApp::MainLoop}\label{wxappmainloop}
\func{int}{MainLoop}{\void}
// stop the program immediately!)
virtual void ExitMainLoop();
- // returns true if the program is initialized, i.e. OnInit() has been
- // completed successfully
- virtual bool Initialized() = 0;
-
// returns TRUE if there are unprocessed events in the event queue
virtual bool Pending();
// deactivated
virtual void SetActive(bool isActive, wxWindow *lastFocus);
+ // OBSOLETE: don't use, always returns true
+ //
+ // returns true if the program is successfully initialized
+ bool Initialized() { return true; }
+
protected:
// delete all objects in wxPendingDelete list
// Implement wxAppBase pure virtuals
virtual int MainLoop();
virtual void ExitMainLoop();
- virtual bool Initialized();
virtual bool Pending();
virtual bool Dispatch();
virtual bool OnInitGui();
// override base class (pure) virtuals
- virtual int MainLoop();
- virtual void ExitMainLoop();
virtual bool Initialized();
- virtual bool Pending();
- virtual bool Dispatch();
-
- virtual void Exit();
virtual bool Yield(bool onlyIfNeeded = FALSE);
virtual void WakeUpIdle();
bool IsInAssert() const { return m_isInAssert; }
#endif // __WXDEBUG__
- bool m_initialized;
-
gint m_idleTag;
#if wxUSE_THREADS
gint m_wakeUpTimerTag;
virtual bool OnInitGui();
// override base class (pure) virtuals
- virtual int MainLoop();
- virtual void ExitMainLoop();
virtual bool Initialized();
- virtual bool Pending();
- virtual bool Dispatch();
-
- virtual void Exit();
virtual bool Yield(bool onlyIfNeeded = FALSE);
virtual void WakeUpIdle();
bool IsInAssert() const { return m_isInAssert; }
#endif // __WXDEBUG__
- bool m_initialized;
-
gint m_idleTag;
#if wxUSE_THREADS
gint m_wakeUpTimerTag;
virtual int MainLoop();
virtual void ExitMainLoop();
- virtual bool Initialized();
virtual bool Pending() ;
virtual bool Dispatch() ;
virtual bool OnInitGui();
// override base class (pure) virtuals
- virtual bool Initialized();
-
virtual bool Initialize(int& argc, wxChar **argv);
virtual void CleanUp();
// -----------------------------------
virtual int MainLoop();
- virtual void ExitMainLoop();
- virtual bool Initialized();
virtual void Exit();
virtual bool Initialize(int& argc, wxChar **argv);
virtual void CleanUp();
- virtual bool Initialized();
-
virtual bool Yield(bool onlyIfNeeded = FALSE);
virtual void WakeUpIdle();
virtual bool Initialize(int& argc, wxChar **argv);
virtual void CleanUp(void);
- virtual bool Initialized(void);
virtual bool OnInitGui(void);
virtual bool Yield(bool onlyIfNeeded = FALSE);
// override base class (pure) virtuals
// -----------------------------------
- virtual bool Initialized();
-
virtual void Exit();
virtual bool Yield(bool onlyIfNeeded = FALSE);
return TRUE;
}
-bool wxApp::Initialized()
-{
- if (GetTopWindow())
- return TRUE;
- else
- return FALSE;
-}
-
void wxApp::Exit()
{
wxApp::CleanUp();
#if wxUSE_EVTLOOP_IN_APP
// we should exit from the main event loop, not just any currently active
// (e.g. modal dialog) event loop
- if ( m_mainLoop )
+ if ( m_mainLoop && m_mainLoop->IsRunning() )
{
m_mainLoop->Exit(0);
}
wxApp::wxApp()
{
- m_initialized = FALSE;
#ifdef __WXDEBUG__
m_isInAssert = FALSE;
#endif // __WXDEBUG__
return visual;
}
-int wxApp::MainLoop()
-{
- gtk_main();
- return 0;
-}
-
-void wxApp::Exit()
-{
- // VZ: no idea why is it different from ExitMainLoop() but this is what
- // wxExit() used to do
- gtk_main_quit();
-}
-
-void wxApp::ExitMainLoop()
-{
- if (gtk_main_level() > 0)
- gtk_main_quit();
-}
-
-bool wxApp::Initialized()
-{
- return m_initialized;
-}
-
-bool wxApp::Pending()
-{
- return (gtk_events_pending() > 0);
-}
-
-bool wxApp::Dispatch()
-{
- gtk_main_iteration();
-
- return true;
-}
-
bool wxApp::Initialize(int& argc, wxChar **argv)
{
#if wxUSE_THREADS
wxApp::wxApp()
{
- m_initialized = FALSE;
#ifdef __WXDEBUG__
m_isInAssert = FALSE;
#endif // __WXDEBUG__
return visual;
}
-int wxApp::MainLoop()
-{
- gtk_main();
- return 0;
-}
-
-void wxApp::Exit()
-{
- // VZ: no idea why is it different from ExitMainLoop() but this is what
- // wxExit() used to do
- gtk_main_quit();
-}
-
-void wxApp::ExitMainLoop()
-{
- if (gtk_main_level() > 0)
- gtk_main_quit();
-}
-
-bool wxApp::Initialized()
-{
- return m_initialized;
-}
-
-bool wxApp::Pending()
-{
- return (gtk_events_pending() > 0);
-}
-
-bool wxApp::Dispatch()
-{
- gtk_main_iteration();
-
- return true;
-}
-
bool wxApp::Initialize(int& argc, wxChar **argv)
{
#if wxUSE_THREADS
#endif
}
-bool wxApp::Initialized()
-{
- if (GetTopWindow())
- return TRUE;
- else
- return FALSE;
-}
-
int wxApp::MainLoop()
{
m_keepGoing = TRUE;
#endif
}
-bool wxApp::Initialized()
-{
- if (GetTopWindow())
- return TRUE;
- else
- return FALSE;
-}
-
int wxApp::MainLoop()
{
m_keepGoing = TRUE;
return TRUE;
}
-bool wxApp::Initialized()
-{
- return wxTopLevelWindows.GetCount() != 0;
-}
-
bool wxApp::Initialize(int& argc, wxChar **argv)
{
#ifdef __DJGPP__
wxApp::SetInstance(NULL);
}
-bool wxApp::Initialized()
-{
- if (GetTopWindow())
- return TRUE;
- else
- return FALSE;
-}
-
int wxApp::MainLoop()
{
/*
return 0;
}
-void wxApp::ExitMainLoop()
-{
- if( m_eventLoop->IsRunning() )
- m_eventLoop->Exit();
-}
-
// This should be redefined in a derived class for
// handling property change events for XAtom IPC.
void wxApp::HandlePropertyChange(WXEvent *event)
delete [] argv;
}
-bool wxApp::Initialized()
-{
-#ifndef _WINDLL
- if (GetTopWindow())
- return TRUE;
- else
- return FALSE;
-#else // Assume initialized if DLL (no way of telling)
- return TRUE;
-#endif
-}
-
void wxApp::OnIdle(wxIdleEvent& event)
{
wxAppBase::OnIdle(event);
#endif
} // end of wxApp::~wxApp
-bool wxApp::Initialized()
-{
- if (GetTopWindow())
- return TRUE;
- else
- return FALSE;
-} // end of wxApp::Initialized
-
bool gbInOnIdle = FALSE;
void wxApp::OnIdle(
#endif
}
-bool wxApp::Initialized()
-{
- if (GetTopWindow())
- return TRUE;
- else
- return FALSE;
-}
-
#if !wxUSE_NANOX
//-----------------------------------------------------------------------
// X11 predicate function for exposure compression