implemented wxCURSOR_BLANK (bug 1377290)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
6f86c8af60
commit
76471ff7f5
@ -51,6 +51,8 @@ wxMSW:
|
||||
|
||||
wxGTK:
|
||||
|
||||
- wxEVT_MENU_CLOSE and wxEVT_MENU_OPENED for popup menus are now generated
|
||||
- Implemented wxCURSOR_BLANK support
|
||||
- Fixed problem with choice editor in wxGrid whereby the editor
|
||||
lost focus when the combobox menu was shown.
|
||||
- Fixed problem trying to print from a preview, whereby wrong printer
|
||||
|
@ -66,6 +66,20 @@ wxCursor::wxCursor( int cursorId )
|
||||
GdkCursorType gdk_cur = GDK_LEFT_PTR;
|
||||
switch (cursorId)
|
||||
{
|
||||
case wxCURSOR_BLANK:
|
||||
{
|
||||
static const gchar bits[] = { 0 };
|
||||
static const GdkColor color = { 0, 0, 0, 0 };
|
||||
|
||||
GdkPixmap *pixmap = gdk_bitmap_create_from_data(NULL, bits, 1, 1);
|
||||
M_CURSORDATA->m_cursor = gdk_cursor_new_from_pixmap(pixmap,
|
||||
pixmap,
|
||||
&color,
|
||||
&color,
|
||||
0, 0);
|
||||
}
|
||||
return;
|
||||
|
||||
case wxCURSOR_ARROW: // fall through to default
|
||||
case wxCURSOR_DEFAULT: gdk_cur = GDK_LEFT_PTR; break;
|
||||
case wxCURSOR_RIGHT_ARROW: gdk_cur = GDK_RIGHT_PTR; break;
|
||||
@ -100,6 +114,7 @@ wxCursor::wxCursor( int cursorId )
|
||||
case wxCURSOR_BASED_ARROW_UP: gdk_cur = GDK_BASED_ARROW_UP; break;
|
||||
case wxCURSOR_BASED_ARROW_DOWN: gdk_cur = GDK_BASED_ARROW_DOWN; break;
|
||||
*/
|
||||
|
||||
default:
|
||||
wxFAIL_MSG(wxT("unsupported cursor type"));
|
||||
// will use the standard one
|
||||
|
@ -66,6 +66,20 @@ wxCursor::wxCursor( int cursorId )
|
||||
GdkCursorType gdk_cur = GDK_LEFT_PTR;
|
||||
switch (cursorId)
|
||||
{
|
||||
case wxCURSOR_BLANK:
|
||||
{
|
||||
static const gchar bits[] = { 0 };
|
||||
static const GdkColor color = { 0, 0, 0, 0 };
|
||||
|
||||
GdkPixmap *pixmap = gdk_bitmap_create_from_data(NULL, bits, 1, 1);
|
||||
M_CURSORDATA->m_cursor = gdk_cursor_new_from_pixmap(pixmap,
|
||||
pixmap,
|
||||
&color,
|
||||
&color,
|
||||
0, 0);
|
||||
}
|
||||
return;
|
||||
|
||||
case wxCURSOR_ARROW: // fall through to default
|
||||
case wxCURSOR_DEFAULT: gdk_cur = GDK_LEFT_PTR; break;
|
||||
case wxCURSOR_RIGHT_ARROW: gdk_cur = GDK_RIGHT_PTR; break;
|
||||
@ -100,6 +114,7 @@ wxCursor::wxCursor( int cursorId )
|
||||
case wxCURSOR_BASED_ARROW_UP: gdk_cur = GDK_BASED_ARROW_UP; break;
|
||||
case wxCURSOR_BASED_ARROW_DOWN: gdk_cur = GDK_BASED_ARROW_DOWN; break;
|
||||
*/
|
||||
|
||||
default:
|
||||
wxFAIL_MSG(wxT("unsupported cursor type"));
|
||||
// will use the standard one
|
||||
|
Loading…
Reference in New Issue
Block a user