Squashed commit of the following:
apps/graphics/twm4nx: Fix an uninitialized variable that was causing toolbar buttons to randomly come up enabled or disabled. Remove some unused event definitions. apps/graphics/twm4nx: Fix a calibration screen startup issue. Make an initial calibration scrren optional
This commit is contained in:
parent
a06b47394b
commit
891ea23356
@ -125,21 +125,6 @@ config TWM4NX_DEBUG
|
||||
and CONFIG_DEBUG_ERROR (but not the corresponding
|
||||
CONFIG_DEBUG_GRAPHICS_* settings)
|
||||
|
||||
comment "Twm4Nx Applications"
|
||||
|
||||
config TWM4NX_CALIBRATION
|
||||
bool "Touchscreen"
|
||||
default y
|
||||
depends on TWM4NX_TOUCHSCREEN
|
||||
---help---
|
||||
Enable support for the touchscreen calibration display.
|
||||
|
||||
config TWM4NX_NXTERM
|
||||
bool "NxTerm Window"
|
||||
default y
|
||||
depends on NXTERM && NSH_LIBRARY
|
||||
---help---
|
||||
Enable support for the NxTerm window which provides a text window
|
||||
in which you can interact with NSH.
|
||||
source "$APPSDIR/graphics/twm4nx/apps/Kconfig"
|
||||
|
||||
endif # GRAPHICS_TWM4NX
|
||||
|
@ -67,6 +67,7 @@ Progress:
|
||||
removed; it can occlude a desktop icon. We need to paint the image
|
||||
directly on the background without the use of a widget.
|
||||
2019-05-15: Resizing now seems to work correctly in Twm4Nx.
|
||||
2019-05-20: Calibration screen is now in place.
|
||||
|
||||
How To:
|
||||
|
||||
@ -143,25 +144,17 @@ Issues:
|
||||
4. A right click on the toolbar should bring up a window-specific menu.
|
||||
|
||||
Other issues/bugs
|
||||
5. There is no calibration screen for touchscreen calibration. I have
|
||||
been working with a system where the touchscreen naturally matches
|
||||
up with the display and no calibration is required. But the general
|
||||
case requires calibration.
|
||||
6. Icon drag movement includes logic to avoid collisions with other
|
||||
5. Icon drag movement includes logic to avoid collisions with other
|
||||
icons and with the background image. That later is an issue. The
|
||||
background image image widget needs to be removed; it can occlude a
|
||||
dektop icon. We need to paint the image directly on the background
|
||||
without the use of a widget.
|
||||
7. More issues with the background image: It absorbs touchscreen
|
||||
6. More issues with the background image: It absorbs touchscreen
|
||||
presses without doing anything. It should bring-up the main menu
|
||||
menu just as any other region of the background. This would be easy
|
||||
to fix, but just replacing the background image widget is the better
|
||||
solution.
|
||||
8. The Icon Manager currently used the default window width. That is
|
||||
7. The Icon Manager currently used the default window width. That is
|
||||
set half of the display width which is okay for the display I am using,
|
||||
but it really needs to set a width that is appropriate for the number
|
||||
of columns and the size of a generic name string.
|
||||
|
||||
Enhancement Ideas:
|
||||
10. How about a full-screen mode? This would just be a shortcut for
|
||||
the existing resize logic.
|
||||
|
34
graphics/twm4nx/apps/Kconfig
Normal file
34
graphics/twm4nx/apps/Kconfig
Normal file
@ -0,0 +1,34 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
comment "Twm4Nx Applications"
|
||||
|
||||
config TWM4NX_CALIBRATION
|
||||
bool "Touchscreen"
|
||||
default y
|
||||
depends on TWM4NX_TOUCHSCREEN
|
||||
---help---
|
||||
Enable support for the touchscreen calibration display.
|
||||
|
||||
if TWM4NX_CALIBRATION
|
||||
|
||||
config TW4NX_STARTUP_CALIB
|
||||
bool "Calibrate on startup"
|
||||
default n
|
||||
---help---
|
||||
Bring up the calibration display automatically on startup. This
|
||||
option is necessary if no stored calibration data is provided and
|
||||
the window manager is not usable without calibration. Otherwise,
|
||||
calibration can be performed later via the Twm4Nx main menu.
|
||||
|
||||
endif # TWM4NX_CALIBRATION
|
||||
|
||||
config TWM4NX_NXTERM
|
||||
bool "NxTerm Window"
|
||||
default y
|
||||
depends on NXTERM && NSH_LIBRARY
|
||||
---help---
|
||||
Enable support for the NxTerm window which provides a text window
|
||||
in which you can interact with NSH.
|
@ -532,9 +532,11 @@ FAR void *CCalibration::calibration(FAR void *arg)
|
||||
|
||||
ginfo("Started: m_calthread=%d\n", (int)This->m_calthread);
|
||||
|
||||
// Make the calibration display visible
|
||||
// Make the calibration display visible and show the initial calibration
|
||||
// display
|
||||
|
||||
This->m_nxWin->show();
|
||||
This->stateMachine();
|
||||
|
||||
// Loop until calibration completes or we have been requested to terminate
|
||||
|
||||
@ -1029,7 +1031,7 @@ void CCalibration::showCalibration(void)
|
||||
|
||||
NXWidgets::CGraphicsPort *port = control->getGraphicsPort();
|
||||
|
||||
// Get the size of the fullscreen window
|
||||
// Get the size of the full screen window
|
||||
|
||||
struct nxgl_size_s windowSize;
|
||||
if (!m_nxWin->getSize(&windowSize))
|
||||
@ -1322,7 +1324,19 @@ bool CCalibrationFactory::initialize(FAR CTwm4Nx *twm4nx)
|
||||
// create a new instance of the touchscreen calibration.
|
||||
|
||||
FAR CMainMenu *cmain = twm4nx->getMainMenu();
|
||||
return cmain->addApplication(this);
|
||||
bool success = cmain->addApplication(this);
|
||||
|
||||
#ifdef CONFIG_TW4NX_STARTUP_CALIB
|
||||
if (success)
|
||||
{
|
||||
// Show the calibration thread at start-up (and later if selected
|
||||
// from the Main Menu)
|
||||
|
||||
startFunction();
|
||||
}
|
||||
#endif
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -433,7 +433,7 @@ bool CIconMgr::event(FAR struct SEventMsg *eventmsg)
|
||||
|
||||
case EVENT_ICONMGR_DEICONIFY: // De-iconify or raise the Icon Manager
|
||||
{
|
||||
// Is the Icon manager conified?
|
||||
// Is the Icon manager iconified?
|
||||
|
||||
if (m_window->isIconified())
|
||||
{
|
||||
@ -447,7 +447,7 @@ bool CIconMgr::event(FAR struct SEventMsg *eventmsg)
|
||||
}
|
||||
else
|
||||
{
|
||||
// No.. Just bring it to the top of the hierachy
|
||||
// No.. Just bring it to the top of the hierarchy
|
||||
|
||||
if (!m_window->raiseWindow())
|
||||
{
|
||||
|
@ -161,6 +161,7 @@ CWindow::CWindow(CTwm4Nx *twm4nx)
|
||||
m_tbLeftX = 0; // Offset to end of left buttons
|
||||
m_tbRightX = 0; // Offset to start of right buttons
|
||||
m_tbFlags = 0; // No customizations
|
||||
m_tbDisables = 0; // No buttons disabled
|
||||
|
||||
// Icons/Icon Manager
|
||||
|
||||
@ -680,11 +681,11 @@ bool CWindow::event(FAR struct SEventMsg *eventmsg)
|
||||
|
||||
switch (eventmsg->eventID)
|
||||
{
|
||||
case EVENT_WINDOW_RAISE: // Raise window to the top of the heirarchy
|
||||
case EVENT_WINDOW_RAISE: // Raise window to the top of the hierarchy
|
||||
m_nxWin->raise(); // Could be the main or the icon window
|
||||
break;
|
||||
|
||||
case EVENT_WINDOW_LOWER: // Lower window to the bottom of the heirarchy
|
||||
case EVENT_WINDOW_LOWER: // Lower window to the bottom of the hierarchy
|
||||
m_nxWin->lower(); // Could be the main or the icon window
|
||||
break;
|
||||
|
||||
@ -694,15 +695,6 @@ bool CWindow::event(FAR struct SEventMsg *eventmsg)
|
||||
}
|
||||
break;
|
||||
|
||||
case EVENT_WINDOW_FOCUS:
|
||||
if (!isIconified())
|
||||
{
|
||||
m_modal = !m_modal;
|
||||
m_nxWin->modal(m_modal);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case EVENT_TOOLBAR_MENU: // Toolbar menu button released
|
||||
{
|
||||
// REVISIT: Not yet implemented (but don't raise an error)
|
||||
@ -773,13 +765,6 @@ bool CWindow::event(FAR struct SEventMsg *eventmsg)
|
||||
}
|
||||
break;
|
||||
|
||||
case EVENT_WINDOW_UNFOCUS: // Exit modal state
|
||||
{
|
||||
m_modal = false;
|
||||
m_nxWin->modal(false);
|
||||
}
|
||||
break;
|
||||
|
||||
case EVENT_TOOLBAR_GRAB: /* Left click on title widget. Start drag */
|
||||
success = toolbarGrab(eventmsg);
|
||||
break;
|
||||
|
@ -142,14 +142,12 @@ namespace Twm4Nx
|
||||
|
||||
// Recipient == WINDOW
|
||||
|
||||
EVENT_WINDOW_FOCUS = 0x6000, /**< Enter modal state */
|
||||
EVENT_WINDOW_UNFOCUS = 0x6001, /**< Exit modal state */
|
||||
EVENT_WINDOW_RAISE = 0x6002, /**< Raise window to the top of the heirarchy */
|
||||
EVENT_WINDOW_LOWER = 0x6003, /**< Lower window to the bottom of the heirarchy */
|
||||
EVENT_WINDOW_DEICONIFY = 0x6004, /**< De-iconify and raise window */
|
||||
EVENT_WINDOW_DRAG = 0x6005, /**< Drag window */
|
||||
EVENT_WINDOW_DELETE = 0x6006, /**< Delete window */
|
||||
EVENT_WINDOW_DESKTOP = 0x6007, /**< Show the desktop */
|
||||
EVENT_WINDOW_RAISE = 0x6000, /**< Raise window to the top of the heirarchy */
|
||||
EVENT_WINDOW_LOWER = 0x6001, /**< Lower window to the bottom of the heirarchy */
|
||||
EVENT_WINDOW_DEICONIFY = 0x6002, /**< De-iconify and raise window */
|
||||
EVENT_WINDOW_DRAG = 0x6003, /**< Drag window */
|
||||
EVENT_WINDOW_DELETE = 0x6004, /**< Delete window */
|
||||
EVENT_WINDOW_DESKTOP = 0x6005, /**< Show the desktop */
|
||||
|
||||
// Recipient == TOOLBAR
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user