class WXDLLIMPEXP_BASE wxMessageOutput;
class WXDLLEXPORT wxRendererNative;
class WXDLLIMPEXP_BASE wxString;
-struct WXDLLIMPEXP_BASE wxToolkitInfo;
// ----------------------------------------------------------------------------
// toolkit information
// and in the latter -- about the OS, so we need to virtualize it
// - wxDynamicLibrary::CanonicalizePluginName() must embed toolkit
// signature in DLL name
- virtual wxToolkitInfo *GetToolkitInfo() = 0;
+ virtual wxToolkitInfo& GetToolkitInfo() = 0;
};
// ----------------------------------------------------------------------------
// other miscellaneous helpers
// ---------------------------
- virtual wxToolkitInfo *GetToolkitInfo();
+ virtual owxToolkitInfo& GetToolkitInfo();
};
#if wxUSE_GUI
// other miscellaneous helpers
// ---------------------------
- virtual wxToolkitInfo *GetToolkitInfo();
+ virtual wxToolkitInfo& GetToolkitInfo();
};
#endif // wxUSE_GUI
// under MSW this function returns same version for both console and GUI
// applications so we can implement it directly in the base class and only
// override it wxGUIAppTraits to fill in toolkit information
- virtual wxToolkitInfo *GetToolkitInfo();
+ virtual wxToolkitInfo& GetToolkitInfo();
};
#endif // _WX_MSW_APPTBASE_H_
virtual void AfterChildWaitLoop(void *data);
virtual bool DoMessageFromThreadWait();
- virtual wxToolkitInfo *GetToolkitInfo();
+ virtual wxToolkitInfo& GetToolkitInfo();
};
#endif // wxUSE_GUI
virtual void DetachWriteFDOfEndProcessPipe(wxExecuteData& execData);
virtual int WaitForChild(wxExecuteData& execData);
- virtual wxToolkitInfo *GetToolkitInfo();
+ virtual wxToolkitInfo& GetToolkitInfo();
};
#if wxUSE_GUI
virtual void DetachWriteFDOfEndProcessPipe(wxExecuteData& execData);
virtual int WaitForChild(wxExecuteData& execData);
- virtual wxToolkitInfo *GetToolkitInfo();
+ virtual wxToolkitInfo& GetToolkitInfo();
};
#endif // wxUSE_GUI
wxAppConsole::GetInstance()->GetTraits() : NULL;
wxASSERT_MSG( traits,
_("can't query for GUI plugins name in console applications") );
- suffix = traits->GetToolkitInfo()->shortName;
+ suffix = traits->GetToolkitInfo().shortName;
}
#if wxUSE_UNICODE
suffix << _T('u');
if ( ! traits )
traits = &traitsConsole;
- wxToolkitInfo *info = traits->GetToolkitInfo();
+ wxToolkitInfo& info = traits->GetToolkitInfo();
if ( verMaj )
- *verMaj = info->versionMajor;
+ *verMaj = info.versionMajor;
if ( verMin )
- *verMin = info->versionMinor;
- return info->os;
+ *verMin = info.versionMinor;
+ return info.os;
}
// ----------------------------------------------------------------------------
return gdk_window_get_visual( wxGetRootWindow()->window )->depth;
}
-wxToolkitInfo *wxGUIAppTraits::GetToolkitInfo()
+wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo()
{
static wxToolkitInfo info;
#ifdef __WXGTK20__
info.versionMajor = GTK_MAJOR_VERSION;
info.versionMinor = GTK_MINOR_VERSION;
info.os = wxGTK;
- return &info;
+ return info;
}
wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
return gdk_window_get_visual( wxGetRootWindow()->window )->depth;
}
-wxToolkitInfo *wxGUIAppTraits::GetToolkitInfo()
+wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo()
{
static wxToolkitInfo info;
#ifdef __WXGTK20__
info.versionMajor = GTK_MAJOR_VERSION;
info.versionMinor = GTK_MINOR_VERSION;
info.os = wxGTK;
- return &info;
+ return info;
}
wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
#endif
}
-wxToolkitInfo *wxConsoleAppTraits::GetToolkitInfo()
+wxToolkitInfo& wxConsoleAppTraits::GetToolkitInfo()
{
static wxToolkitInfo info;
info.os = DoGetOSVersion(&info.majorVersion, &info.minorVersion);
info.name = _T("wxBase");
- return &info;
+ return info;
}
#endif // wxUSE_BASE
#if wxUSE_GUI
-wxToolkitInfo *wxGUIAppTraits::GetToolkitInfo()
+wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo()
{
static wxToolkitInfo info;
info.os = DoGetOSVersion(&info.majorVersion, &info.minorVersion);
info.shortName << _T("univ");
info.name << _T("/wxUniversal");
#endif
- return &info;
+ return info;
}
// Reading and writing resources (eg WIN.INI, .Xdefaults)
#endif
}
-wxToolkitInfo *wxConsoleAppTraits::GetToolkitInfo()
+wxToolkitInfo& wxConsoleAppTraits::GetToolkitInfo()
{
static wxToolkitInfo info;
info.os = DoGetOSVersion(&info.majorVersion, &info.minorVersion);
info.name = _T("wxBase");
- return &info;
+ return info;
}
#endif // wxUSE_BASE
#if wxUSE_GUI
-wxToolkitInfo *wxGUIAppTraits::GetToolkitInfo()
+wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo()
{
static wxToolkitInfo info;
info.os = DoGetOSVersion(&info.majorVersion, &info.minorVersion);
info.shortName << _T("univ");
info.name << _T("/wxUniversal");
#endif
- return &info;
+ return info;
}
// Reading and writing resources (eg WIN.INI, .Xdefaults)
XBell (wxGlobalDisplay(), 0);
}
-wxToolkitInfo *wxGUIAppTraits::GetToolkitInfo()
+wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo()
{
wxToolkitInfo info;
info.shortName = _T("motif");
info.versionMajor = ProtocolVersion (display);
info.versionMinor = ProtocolRevision (display);
info.os = wxMOTIF_X;
- return &info;
+ return info;
}
// ----------------------------------------------------------------------------
return !wxTheApp || wxTheApp->DoMessage();
}
-wxToolkitInfo *wxGUIAppTraits::GetToolkitInfo()
+wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo()
{
static wxToolkitInfo info;
- wxToolkitInfo *baseInfo = wxAppTraits::GetToolkitInfo();
- info.versionMajor = baseInfo->versionMajor;
- info.versionMinor = baseInfo->versionMinor;
- info.os = baseInfo->os;
+ wxToolkitInfo& baseInfo = wxAppTraits::GetToolkitInfo();
+ info.versionMajor = baseInfo.versionMajor;
+ info.versionMinor = baseInfo.versionMinor;
+ info.os = baseInfo.os;
info.shortName = _T("msw");
info.name = _T("wxMSW");
#ifdef __WXUNIVERSAL__
info.shortName << _T("univ");
info.name << _T("/wxUniversal");
#endif
- return &info;
+ return info;
}
// ===========================================================================
#endif // Win32/16
}
-wxToolkitInfo *wxAppTraits::GetToolkitInfo()
+wxToolkitInfo& wxAppTraits::GetToolkitInfo()
{
// cache the version info, it's not going to change
//
info.versionMinor = s_minor;
info.os = s_ver;
info.name = _T("wxBase");
- return &info;
+ return info;
}
// ----------------------------------------------------------------------------
// this is in mac/utils.cpp under Mac
#ifndef __WXMAC__
-wxToolkitInfo *wxConsoleAppTraits::GetToolkitInfo()
+wxToolkitInfo& wxConsoleAppTraits::GetToolkitInfo()
{
static wxToolkitInfo info;
int major, minor;
info.name = _T("wxBase");
info.os = wxUNIX;
- return &info;
+ return info;
}
#endif // __WXMAC__
XBell ((Display*) wxGetDisplay(), 0);
}
-wxToolkitInfo *wxGUIAppTraits::GetToolkitInfo()
+wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo()
{
static wxToolkitInfo info;
info.shortName = _T("x11univ");
info.versionMajor = 0;
info.versionMinor = 0;
info.os = wxX11;
- return &info;
+ return info;
}
// ----------------------------------------------------------------------------