Update to docs incl. wxString first stab; added a couple of palette-related events (wxMSW)

needed for wxGLCanvas


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-07-29 06:51:33 +00:00
parent 9746a2ba50
commit f7bd26981f
27 changed files with 600 additions and 1545 deletions

View File

@@ -907,6 +907,46 @@ class WXDLLEXPORT wxSysColourChangedEvent: public wxEvent
{ m_eventType = wxEVT_SYS_COLOUR_CHANGED; }
};
/*
wxEVT_PALETTE_CHANGED
*/
class WXDLLEXPORT wxPaletteChangedEvent: public wxEvent
{
DECLARE_DYNAMIC_CLASS(wxPaletteChangedEvent)
public:
inline wxPaletteChangedEvent(wxWindowID id = 0): wxEvent(id)
{ m_eventType = wxEVT_PALETTE_CHANGED; m_changedWindow = NULL; }
inline void SetChangedWindow(wxWindow* win) { m_changedWindow = win; }
inline wxWindow* GetChangedWindow() const { return m_changedWindow; }
protected:
wxWindow* m_changedWindow;
};
/*
wxEVT_QUERY_NEW_PALETTE
Indicates the window is getting keyboard focus and should re-do its palette.
*/
class WXDLLEXPORT wxQueryNewPaletteEvent: public wxEvent
{
DECLARE_DYNAMIC_CLASS(wxQueryNewPaletteEvent)
public:
inline wxQueryNewPaletteEvent(wxWindowID id = 0): wxEvent(id)
{ m_eventType = wxEVT_QUERY_NEW_PALETTE; m_paletteRealized = FALSE; }
// App sets this if it changes the palette.
inline void SetPaletteRealized(bool realized) { m_paletteRealized = realized; }
inline bool GetPaletteRealized() const { return m_paletteRealized; }
protected:
bool m_paletteRealized;
};
/*
Event generated by dialog navigation keys
wxEVT_NAVIGATION_KEY
@@ -940,8 +980,6 @@ public:
wxEVT_DESTROY,
wxEVT_MOUSE_CAPTURE_CHANGED,
wxEVT_SETTING_CHANGED, // WM_WININICHANGE (NT) / WM_SETTINGCHANGE (Win95)
wxEVT_QUERY_NEW_PALETTE,
wxEVT_PALETTE_CHANGED,
// 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.
@@ -1046,6 +1084,8 @@ typedef void (wxEvtHandler::*wxShowEventFunction)(wxShowEvent&);
typedef void (wxEvtHandler::*wxIconizeEventFunction)(wxShowEvent&);
typedef void (wxEvtHandler::*wxMaximizeEventFunction)(wxShowEvent&);
typedef void (wxEvtHandler::*wxNavigationKeyEventFunction)(wxNavigationKeyEvent&);
typedef void (wxEvtHandler::*wxPaletteChangedEventFunction)(wxPaletteChangedEvent&);
typedef void (wxEvtHandler::*wxQueryNewPaletteEventFunction)(wxQueryNewPaletteEvent&);
// N.B. In GNU-WIN32, you *have* to take the address of a member function
// (use &) or the compiler crashes...
@@ -1097,6 +1137,8 @@ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
#define EVT_MAXIMIZE(func) { wxEVT_MAXIMIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMaximizeEventFunction) & func, NULL },
#define EVT_ICONIZE(func) { wxEVT_ICONIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxIconizeEventFunction) & func, NULL },
#define EVT_NAVIGATION_KEY(func) { wxEVT_NAVIGATION_KEY, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNavigationKeyEventFunction) & func, NULL },
#define EVT_PALETTE_CHANGED(func) { wxEVT_PALETTE_CHANGED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxPaletteChangedEventFunction) & func, NULL },
#define EVT_QUERY_NEW_PALETTE(func) { wxEVT_QUERY_NEW_PALETTE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxQueryNewPaletteEventFunction) & func, NULL },
// Mouse events
#define EVT_LEFT_DOWN(func) { wxEVT_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL },

View File

@@ -503,6 +503,8 @@ public:
virtual WXHBRUSH MSWOnCtlColor(WXHDC dc, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
virtual bool MSWOnColorChange(WXHWND hWnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
virtual long MSWOnPaletteChanged(WXHWND hWndPalChange);
virtual long MSWOnQueryNewPalette();
virtual bool MSWOnEraseBkgnd(WXHDC pDC);
virtual void MSWOnMenuHighlight(WXWORD item, WXWORD flags, WXHMENU sysmenu);
virtual void MSWOnInitMenuPopup(WXHMENU menu, int pos, bool isSystem);

View File

@@ -112,10 +112,10 @@ inline int WXDLLEXPORT Stricmp(const char *psz1, const char *psz2)
// ----------------------------------------------------------------------------
// global pointer to empty string
extern const char *g_szNul;
WXDLLEXPORT_DATA(extern const char*) g_szNul;
// return an empty wxString
class wxString; // not yet defined
class WXDLLEXPORT wxString; // not yet defined
inline const wxString& wxGetEmptyString() { return *(wxString *)&g_szNul; }
// ---------------------------------------------------------------------------
@@ -375,13 +375,13 @@ public:
/** @name string comparison */
//@{
/**
case-sensitive comparaison
case-sensitive comparison
@return 0 if equal, +1 if greater or -1 if less
@see CmpNoCase, IsSameAs
*/
int Cmp(const char *psz) const { return strcmp(c_str(), psz); }
/**
case-insensitive comparaison, return code as for wxString::Cmp()
case-insensitive comparison, return code as for wxString::Cmp()
@see: Cmp, IsSameAs
*/
int CmpNoCase(const char *psz) const { return Stricmp(c_str(), psz); }
@@ -758,14 +758,14 @@ public:
//@{
/// just like strcmp()
int compare(const wxString& str) const { return Cmp(str); }
/// comparaison with a substring
/// comparison with a substring
int compare(size_t nStart, size_t nLen, const wxString& str) const;
/// comparaison of 2 substrings
/// comparison of 2 substrings
int compare(size_t nStart, size_t nLen,
const wxString& str, size_t nStart2, size_t nLen2) const;
/// just like strcmp()
int compare(const char* sz) const { return Cmp(sz); }
/// substring comparaison with first nCount characters of sz
/// substring comparison with first nCount characters of sz
int compare(size_t nStart, size_t nLen,
const char* sz, size_t nCount = npos) const;
//@}
@@ -843,7 +843,7 @@ public:
/**
Search the element in the array, starting from the either side
@param if bFromEnd reverse search direction
@param if bCase, comparaison is case sensitive (default)
@param if bCase, comparison is case sensitive (default)
@return index of the first item matched or NOT_FOUND
@see NOT_FOUND
*/
@@ -872,8 +872,8 @@ private:
};
// ---------------------------------------------------------------------------
/** @name wxString comparaison functions
@memo Comparaisons are case sensitive
/** @name wxString comparison functions
@memo Comparisons are case sensitive
*/
// ---------------------------------------------------------------------------
//@{