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:
@@ -51,6 +51,8 @@ wxMSW:
|
|||||||
|
|
||||||
wxGTK:
|
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
|
- Fixed problem with choice editor in wxGrid whereby the editor
|
||||||
lost focus when the combobox menu was shown.
|
lost focus when the combobox menu was shown.
|
||||||
- Fixed problem trying to print from a preview, whereby wrong printer
|
- 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;
|
GdkCursorType gdk_cur = GDK_LEFT_PTR;
|
||||||
switch (cursorId)
|
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_ARROW: // fall through to default
|
||||||
case wxCURSOR_DEFAULT: gdk_cur = GDK_LEFT_PTR; break;
|
case wxCURSOR_DEFAULT: gdk_cur = GDK_LEFT_PTR; break;
|
||||||
case wxCURSOR_RIGHT_ARROW: gdk_cur = GDK_RIGHT_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_UP: gdk_cur = GDK_BASED_ARROW_UP; break;
|
||||||
case wxCURSOR_BASED_ARROW_DOWN: gdk_cur = GDK_BASED_ARROW_DOWN; break;
|
case wxCURSOR_BASED_ARROW_DOWN: gdk_cur = GDK_BASED_ARROW_DOWN; break;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
default:
|
default:
|
||||||
wxFAIL_MSG(wxT("unsupported cursor type"));
|
wxFAIL_MSG(wxT("unsupported cursor type"));
|
||||||
// will use the standard one
|
// will use the standard one
|
||||||
|
@@ -66,6 +66,20 @@ wxCursor::wxCursor( int cursorId )
|
|||||||
GdkCursorType gdk_cur = GDK_LEFT_PTR;
|
GdkCursorType gdk_cur = GDK_LEFT_PTR;
|
||||||
switch (cursorId)
|
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_ARROW: // fall through to default
|
||||||
case wxCURSOR_DEFAULT: gdk_cur = GDK_LEFT_PTR; break;
|
case wxCURSOR_DEFAULT: gdk_cur = GDK_LEFT_PTR; break;
|
||||||
case wxCURSOR_RIGHT_ARROW: gdk_cur = GDK_RIGHT_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_UP: gdk_cur = GDK_BASED_ARROW_UP; break;
|
||||||
case wxCURSOR_BASED_ARROW_DOWN: gdk_cur = GDK_BASED_ARROW_DOWN; break;
|
case wxCURSOR_BASED_ARROW_DOWN: gdk_cur = GDK_BASED_ARROW_DOWN; break;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
default:
|
default:
|
||||||
wxFAIL_MSG(wxT("unsupported cursor type"));
|
wxFAIL_MSG(wxT("unsupported cursor type"));
|
||||||
// will use the standard one
|
// will use the standard one
|
||||||
|
Reference in New Issue
Block a user