apps/graphics/twm4ndx: Compile out cursor support if we are using a mouse
This commit is contained in:
parent
d237001bc3
commit
5f79775690
@ -96,6 +96,7 @@ choice
|
||||
|
||||
config TWM4NX_MOUSE
|
||||
bool "Mouse"
|
||||
select NX_SWCURSOR
|
||||
|
||||
config TWM4NX_TOUCHSCREEN
|
||||
bool "Touchscreen"
|
||||
|
@ -58,7 +58,11 @@ CXXSRCS = twm4nx_main.cxx
|
||||
CXXSRCS += cbackground.cxx cfonts.cxx ciconmgr.cxx ciconwidget.cxx
|
||||
CXXSRCS += cmenus.cxx cmainmenu.cxx
|
||||
CXXSRCS += cwindow.cxx cwindowevent.cxx cresize.cxx cwindowfactory.cxx
|
||||
CXXSRCS += cinput.cxx twm4nx_cursor.cxx
|
||||
CXXSRCS += cinput.cxx
|
||||
|
||||
ifeq ($(CONFIG_TWM4NX_MOUSE),y)
|
||||
CXXSRCS += twm4nx_cursor.cxx
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TWM4NX_NXTERM),y)
|
||||
CXXSRCS += cnxterm.cxx
|
||||
|
@ -71,7 +71,7 @@
|
||||
// space in the maximum font height
|
||||
|
||||
#define ICONWIDGET_IMAGE_VSPACING 2 // Lines between image and upper text
|
||||
#define ICONWIDGET_TEXT_VSPACING 0 // Lines betweern upper and lower text
|
||||
#define ICONWIDGET_TEXT_VSPACING 0 // Lines between upper and lower text
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CIconWidget Method Implementations
|
||||
@ -655,13 +655,18 @@ bool CIconWidget::iconGrab(FAR struct SEventMsg *eventmsg)
|
||||
// Select the grab cursor image
|
||||
|
||||
m_twm4nx->setCursorImage(&CONFIG_TWM4NX_GBCURSOR_IMAGE);
|
||||
#endif
|
||||
|
||||
// Remember the grab cursor size. This, of course, makes
|
||||
// little since if we are using a touchscreen.
|
||||
// Remember the grab cursor size.
|
||||
|
||||
m_dragCSize.w = CONFIG_TWM4NX_GBCURSOR_IMAGE.size.w;
|
||||
m_dragCSize.h = CONFIG_TWM4NX_GBCURSOR_IMAGE.size.h;
|
||||
#else
|
||||
// Fudge a value for the case where we are using a touchscreen.
|
||||
|
||||
m_dragCSize.w = 16;
|
||||
m_dragCSize.h = 16;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1697,13 +1697,19 @@ bool CWindow::toolbarGrab(FAR struct SEventMsg *eventmsg)
|
||||
// Select the grab cursor image
|
||||
|
||||
m_twm4nx->setCursorImage(&CONFIG_TWM4NX_GBCURSOR_IMAGE);
|
||||
#endif
|
||||
|
||||
// Remember the grab cursor size
|
||||
|
||||
m_dragCSize.w = CONFIG_TWM4NX_GBCURSOR_IMAGE.size.w;
|
||||
m_dragCSize.h = CONFIG_TWM4NX_GBCURSOR_IMAGE.size.h;
|
||||
|
||||
#else
|
||||
// Fudge a value for the case where we are using a touchscreen.
|
||||
|
||||
m_dragCSize.w = 16;
|
||||
m_dragCSize.h = 16;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user