News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

ModernUI Framework & Controls

Started by fearless, July 18, 2018, 03:51:56 AM

Previous topic - Next topic

fearless

I decided to create a post here to highlight this project and for a place to discuss it and any of the controls, usage, feedback, issues etc - rather than diverting existing threads.

ModernUI Background & Goals

The initial commits to the Github repositories for the ModernUI project was on May 16, 2016, but the precursor to all of it was probably 2014 when I created a small HotMenu control to emulate valve's steam menu system, before working on other custom controls. I mention this in a small Gitbook I started in May 2017, which gives an overview of creating custom controls in assembler and touches briefly on the ModernUI framework and its controls. The SimpleButton example code in that Gitbook is very closely based on the methods and coding used in the ModernUI stuff - slightly adapted to contain it to an all in one example. The Gitbook can be found here for those interested in it.

I created a design document to roughly help guide my work (or for others that wish to contribute) which starts with:

QuoteProject Goals

For years, new control types and UI designs for operating system and web have progressed, whilst older win32 base controls which are used by win32 assemblers (masm32 etc) have remained untouched. The ModernUI project has been created to help modernize these existing controls and add to them. The main goals of the project are:

- Provide a modern update to existing win32 base class visual controls.
- Add new control types to reflect newer UI/UX design influences.
- Emulate control types from UWP, WPF, .Net & Web 2.0 platforms.

ModernUI Project

There is a ModernUI project for x86 and for x64:

- https://github.com/mrfearless/ModernUI
- https://github.com/mrfearless/ModernUI64

And a wiki that contains some documentation: https://github.com/mrfearless/ModernUI/wiki

Each project has its own base/main/core library: ModernUI, that is used by all of the ModernUI controls. I have placed in it some functions that are regularly used by the controls, or might make sense to host in this main library.

ModernUI Controls

There is a list of the controls on the wiki:

- ModernUI_Background
- ModernUI_Button
- ModernUI_CaptionBar
- ModernUI_Checkbox
- ModernUI_DesktopFace
- ModernUI_Icon
- ModernUI_Image
- ModernUI_Map
- ModernUI_NavView
- ModernUI_NewsTicker
- ModernUI_NotifyIcon
- ModernUI_ProgressBar
- ModernUI_Region
- ModernUI_ScrollBar
- ModernUI_SmartPanel
- ModernUI_Text
- ModernUI_Tooltip
- ModernUI_TrayMenu

Note: Some controls might not be available, they may be: future releases, prototypes, work in progress (unfinished), abandoned.
Additionally some features: functions, messages, structures, constants, and/or properties may change throughout the development of the ModernUI framework and any of the controls.

ModernUI RadASM Support

I have tried to also include RadASM auto-complete support for the functions and parameters of the ModernUI functions where possible for the framework and controls. Hopefully this makes it a little easier to work with. Additionally for a few controls I have tried to create dummy RadASM design time controls to drag and drop onto dialogs. There are some limitations to using the design time versions as not all features that are exposed via properties can be handled, so this is limited to styles that are passed to the control on creation - which itself is limited. But it might be useful for quicker prototyping and for that reason I created them. There is a chance that they may be out of sync with the control they represent. These files and design time controls can be found under the releases folder of the project: RadASM ModernUI Api files.zip and RAMUIControls.zip

ModernUI Help & Contributions

Anyone can use the code and libraries and if anyone wants to help out in any way that would be great. Helping out can be testing, submitting issues on github, posting on the forums regarding usage or issues, suggestions and ideas and feature requests, adding documentation etc. And of course contributing to the project code directly - refactoring code, optimizing functions, adding custom controls etc. And I now also have a buy me a coffee link: buymeacoffee.com/mrfearless, if anyone wishes to support myself and the project in that manner as well.

I hope you find the project and its code is useful in some way.

Adamanteus

At all excellent looks, but few remarks ;
1) code misaligned, look into m32lib\szcopy, there align present, so MUIButton1 on weak hardware hangs on exit as callback exception
2) directory structure not ordonary, also was post here how it could be and build libraries system
3) not all ico in Images catalogues

fearless

Quote from: Adamanteus on July 22, 2018, 02:01:28 AM
At all excellent looks, but few remarks ;
Thanks.

Quote from: Adamanteus on July 22, 2018, 02:01:28 AM1) code misaligned, look into m32lib\szcopy, there align present, so MUIButton1 on weak hardware hangs on exit as callback exception
I will add the align 4 to code sections on the main library and controls for x86 version (and align 8 to the x64 versions?). I wasnt aware of using alignment, or wasnt sure about it, hence why i never added it or done much with it. Hopefully adding the align will help make it all more stable. Did some changes to ModernUI_Button a while back, so the MUIButton1 example doesnt show the notify stuff correctly - think i will take out that stuff, as not sure its needed. Also possible the gdi+ stuff without the alignment might be causing the crash as someone mentioned a while back about the that example crashing and thought it was due to gdi+ (using the png's with the MUIButton) as the example makes use of the MUIGdiStart and MUIGdiFinish wrapper functions.


Quote from: Adamanteus on July 22, 2018, 02:01:28 AM2) directory structure not ordonary, also was post here how it could be and build libraries system
I will add some more stuff to the wiki page soon about using the library and controls and where to place the include and lib files. Not sure what you meant by directory structure not ordinary. Can you expand on what that means, thanks.
I can add some information on building the library sources manually if someone isn't using the RadASM projects, let me know if you think this would be useful.


Quote from: Adamanteus on July 22, 2018, 02:01:28 AM3) not all ico in Images catalogues
Im not sure if thats ico files not included with examples, or ico files in the icons folder/zip (which has a dark/light theme) are not all there, or are not converted to smaller/larger sizes or are not complete. Im assuming its the latter option - its possible some icons havent been converted to different sizes (or dark/light versions) - only done some as i was testing/using. Let me know if there is any specifically you need or think i should look at.

Thanks for the feedback, much appreciated :D

Adamanteus

Quote from: Adamanteus on July 22, 2018, 02:01:28 AM
... MUIButton1 on weak hardware hangs on exit as callback exception
- that's was GDI+ png destoying, from UNKNOWN.Release - not works, on my version of lib, so I stayed it free, as GlobalCompact looks something doing ...

Adamanteus

Also remarks about registering prototypes :
- preffered to use Win64 atoms, for cration windows
- that if to load controls from resources of dll, to them need somehow to register classes, so to prototypes is need to pass module instance parameter.
What's happened, attached :