Commit Graph

24 Commits

Author SHA1 Message Date
Gregory Nutt
598bf28f34 apps/graphics/twm4nx: Extend the IDragEvents interfaces and user's thereof to better handle the cases when dragging where the mouse position gets ahead of the window updates and the reported mouse position lies not in the toolbar window, but in the main window or even outside of the window. 2019-05-07 18:20:42 -06:00
Gregory Nutt
d244b7a11d Squashed commit of the following:
apps/graphics/twm4nx:  Additional redesign.  Window draggin now sort of works in an unreliable hurky-gurky way.  More to be done.

    apps/graphics/twm4nx:  First cut at redesigned dragging logic
2019-05-07 16:16:47 -06:00
Gregory Nutt
b0d39372fb apps/graphics/twm4nx: Exploit the new feature to create hidden windows. This cleans up some brief window startup anomalies. Also fixes an initialization error in CMenus. 2019-05-07 08:51:37 -06:00
Gregory Nutt
b512ec0235 Trival removal of spaces dangling at the end of lines. 2019-05-06 18:13:03 -06:00
Gregory Nutt
eaffa13f54 Squashed commit of the following:
apps/graphics/twm4nx:  Replace most usage of NUL-terminated C strings with NXWidgets::CNxString.

    apps/graphics/twm4nx:  Add initial support for the main menu.  The main menu will come up when a left click is performed on the background.  The main menu is used for starting applications.  The adds the CMainMenu class that implements the main menu and an IApplication interface class the provides th template for how any external C++ application can add itself to the Main Menu.

    Still missing is the logic that responds to the meny item selection and sends the event to the Main Menu as well as the logic in the Main Menu that handles the event and either brings up a sub-menu or starts and application.

    Things are still basically functional after these changes, but my gut feeling is these changes added some instabilities that will need to be smoothed out.
2019-05-06 18:10:45 -06:00
Gregory Nutt
02c148e07e Squashed commit of the following:
apps/graphics/twm4nx:  Try to improve icon text spacing.  Not noticeably better, however.

    apps/graphics:  Split long icon title on two lines below the icon image.

    apps/graphics/twm4nx:  Both iconification and de-iconification work.

    apps/graphics/twm4nx: Various fixed toward de-iconifying a window.  Progress but still not there yet.
2019-05-06 12:05:53 -06:00
Gregory Nutt
1879949cdc apps/graphics/twm4nx: Add logic to hide the window when it is iconified and restore the window when it is de-iconfied. Iconification works, de-iconification does not. 2019-05-05 15:23:50 -06:00
Gregory Nutt
1e4dfd7193 apps/graphics/twm4nx: Trying (unsuccessfully so far) to get events from iconified windows. 2019-05-05 11:50:08 -06:00
Gregory Nutt
64cf50e2eb graphics/twm4nx/src/cbackground.cxx: Add logic to handle polling for background icon events.
graphics/twm4nx/src/window.cxx:  Add flags to CWindow initializer to support customization of toolbar buttons and other window properties.  Add framework to handle toolbar button presses.  Window minimization (aka, iconification) does not work.

graphics/twm4nx/src/input.cxx:  Add support to scaling touchscreen.  Not needed for the current testing because the touchscreen naturally matches the display size.  But will be needed, along with calibration scren, in the future.
2019-05-05 10:23:46 -06:00
Gregory Nutt
f64df4a376 apps/graphics/twm4nx: Additional changes needed to use touchscreen with no keyboard. 2019-05-04 14:51:49 -06:00
Gregory Nutt
afbb51eb1e apps/graphics/twm4nx: Add option to use touschreen instead of mouse input. 2019-05-04 12:26:14 -06:00
Gregory Nutt
f3b3d1fc72 apps/graphics/NxWidgets: CNxTkWindow, CNxWindow, CNxServer: Add support to create RAM backed windows.
apps/graphics/twm4nx:  IconMgr window now comes up correctly.  Need to revisit window width setup.  All windows are no created as RAM backed windows.
2019-05-04 11:45:15 -06:00
Gregory Nutt
b5ae79b8f3 graphics/twm4nx/Kconfig: Add configuration disable keyboard/mouse input for testing purposes.
graphics/twm4nx/src/ciconmgr.cxx:  Correct initial window size and position in the upper righthand corner;  Need to fill draw the button array immediately on window creation.

graphics/twm4nx/src/cwindow.cxx:  Need to fill the toolbar initially with the widget background color.
2019-05-04 10:33:16 -06:00
Gregory Nutt
445e0eef79 apps/graphic/twm4nx: Fix junk varialbe that was shadowing variable of the same name in the base CNxWidget class. Resolves all start up crash issues. Now I need to figure out why the host VNC client drops the connection. 2019-05-02 16:40:10 -06:00
Gregory Nutt
2fff83d60d apps/graphics/twm4nx: Correct design of input event logic. Still getting a hardfault. 2019-05-02 14:41:53 -06:00
Gregory Nutt
358f32bfdc Squashed commit of the following:
apps/graphics/twm4nx:  Fix various bugs found in bringup:  Re-order object instantiation to account for inter-object dependencies.  Correct mq_receive() buffer size.  Fix a backward comparison.

    apps/graphics/twm4nx:  Twm4Nx debug can now be separately enabled so that it does not get overwhelmed by other graphics debug output.
2019-05-02 09:19:45 -06:00
Gregory Nutt
f730108adb Squashed commit of the following:
apps/graphics/NxWidgets:  Fix a possible deadlock condition when waiting for window geometry data that will never come.  Fixed by re-requesting geometry data if we don't already have it.

    apps/graphics/twm4nx:  Add some debug output.

    apps/graphics/twm4nx:  Rethink how background events are handled.

    apps/grephics/twm4nx:  Expermimental organization to capture background events.
2019-05-01 11:11:43 -06:00
Gregory Nutt
6a970ec4e9 apps/graphics/twm4nx: Suppress input thread if using the VNC server. We don't need to catch input fromo keyboard and mouse devices in that case; those inputs will be injected into NX directly by the VNC server. Includes a couple of fixes from initial bringup attempts. 2019-04-28 12:47:49 -06:00
Gregory Nutt
e742f97674 Squashed commit of the following:
apps/graphics/twm4nx:  Remove Icon Windows; replace with IconWidgets that are draw on the background.
    apps/graphics/twm4nx:  Add CIconWidget event generation.
    apps/graphics/twm4nx:  Add event handling logic to CIconWidget.
2019-04-28 09:24:05 -06:00
Gregory Nutt
0c6f41912c apps/graphics/twm4nx: Add compount widget CIconWidget. This will eventually replace the icon Windows with widgets that can be drawn on the Background. 2019-04-27 17:53:02 -06:00
Gregory Nutt
9030bf631d apps/graphics/twm4nx: Flesh out some of the Resize logic. Still missing the pull events needed to do the resize. 2019-04-27 12:05:18 -06:00
Gregory Nutt
c144919a4e apps/graphics/twm4nx: Finsh menu-related event handling. Extended menu handling. Allow external application event handling using a new base class (CTwm4NxEvent). 2019-04-27 09:35:05 -06:00
Gregory Nutt
601659ff59 Squashed commit of the following:
graphics/twm4nx/src/ciconmgr.cxx:  Integrate use of CButtonArray; implement first cut at event handling.

    graphics/nxwidgets/src/cbuttonarray.cxx:  Add a method to CButtonArray that will allow us to dynamically resize the array (at the cost of losing all button labels).

    graphics/twm4nx/src/ciconmgr.cxx:  Add some fragments of CButtonArray logic.

    graphics/twm4nx/src/cwindow.cxx:  Finishes first cut at window event management.
2019-04-26 12:50:35 -06:00
Gregory Nutt
950b4cb604 wm4Nx is a port of twm, Tab Window Manager (or Tom's Window Manager)
version 1.0.10 to NuttX NX windows server.  No, a port is not the right
word.  It is a re-design of TWM from the inside out to work with the NuttX
NX server.  The name Twm4Nx reflects this legacy.  But Twm4Nx is more a
homage to TWM than a port of TWM.

The original TWM was based on X11 which provides a rich set of features.
TWM provided titlebars, shaped windows, several forms of icon management,
user-defined macro functions, click-to-type and pointer-driven keyboard
focus, graphic contexts, and user-specified key and pointer button bindings,
etc.

Twm4Nx, on the other hand is based on the NuttX NX server which provides
comparatively minimal support.  Additional drawing support comes from
the NuttX NxWidgets library (which necessitated the change to C++).

Twm4Nx is greatly stripped down and targeted on small embedded systems
with minimal resources.  For example, no assumption is made about the
availability of a file system; no .twmrc file is used.  Bitmaps are not
used (other than for fonts).

The TWM license is, I believe compatible with the BSD license used by NuttX.
The origin TWM license required notice of copyrights within each file and
a full copy of the original license which you can find in the COPYING file.
within this directory.

STATUS:

This port was brutal.  Much TWM logic was removed because it depending on X11 features (or just because I could not understand how to use it).  The logic is partial.  A lot more needs to be done to have a complete system (hence, it is marked EXPERIMENTAL).  The kinds of things that need to done are:

1. Update some logic that is only fragmentary for how like resizing, and menus.
2. Integrate NxWidgets into the windows:  The resize menu needs a CLabel, the menus are CListBox'es, but not completely integrated, the Icon Manager needs to be a button array.
3. Resit Icons.  They are windows now, but need to be compound widgets lying on the background.
4. Widget events are only partially integrated.  A lot more needs to be done.  A partial change to thoe event system that hints at the redesign is in place but it is far from complete.
2019-04-25 16:54:17 -06:00