nfengine icon indicating copy to clipboard operation
nfengine copied to clipboard

Add MessageWindow to Common

Open lookeypl opened this issue 8 years ago • 1 comments

As an example in Assertion.cpp shows, sometimes we might want to create a popup window through Window Manager on OS. While on Windows it is as easy as calling a single WinAPI call (MessageBox), on Linux you need to do everything manually. Moreover, Windows' MessageBox might be too simple for our needs, so even using it won't be enough.

  • [ ] Implement a NFE::Common::MessageWindow object, which will display a simple popup message in platform-independent way
  • [ ] The MessageWindow features:
    • [ ] Internal OS implementation only (WinAPI/X)
    • [ ] Ability to add custom action buttons outside of code
    • [ ] Main text message should be inside a read-only EditBox/ScrollBox or similar component to enable copying the message

MessageWindow's interface does not have to be very user friendly or prone to errors, we will use it as an internal mechanism in Engine to ex. notify about failed assertions, crashes and other unexpected behavior. In other words, we assume that end user won't need to access it.

lookeypl avatar Feb 06 '17 13:02 lookeypl

Some tutorial about using X11 to create buttons: http://xopendisplay.hilltopia.ca/2009/Mar/Xlib-tutorial-part-9----Buttons.html

mkulagowski avatar Feb 06 '17 15:02 mkulagowski