Author Topic: SlimViewer, project in MasmBasic  (Read 1703 times)

LordAdef

  • Member
  • ****
  • Posts: 590
Re: SlimViewer, project in MasmBasic
« Reply #15 on: February 06, 2018, 03:46:59 PM »
Hi Jochen, Here we go for a next batch!

I inserted a menubar, based on your template (and research here too). But before we go into it, let me cover some other things.

1.
Quote
   GuiParas equ "SlimViewer", x650, y20, w800, h900, c black,  b 555555h      ; Last item == Bk colour
    ; GuiParas equ "SlimViewer", xr5, y5, w800, h-5, b RgbCol(160, 255, 200), m3   ; x right-aligned 5px, y5px, width 800, height-5px
The line below was taken from one of your examples. It´s a more elaborate function, with alignment. How many more things like that there is? And what´s the meaning of "m3"?

2. As you already know by my .asc files, I like the dark interface, kind of Visual-you-Know.. I managed to set my control´s backgrounds (including the treeView) dark, but couldn´t find a way to do it for the ComboBox (which appears to be a bit difficult) and the GuiControl static "labels" text to white. And out-of-curiosity, can the BKground of the Status and menu be darkened too?

3. If you run my *.exe, I´m recalling a .asc file (thus richtext). Although our filtre is doing a fine job when it comes to text files (asm), it´s getting richtext stuff like \tabs. I know when within the plugin enviroment, one can fetch a text format instead of the richtext. Is that the case or I must think of richText format hunting?

4. MenuBar!  I did a bit of hacking and managed to pull it into the prog. Nice! I placed everything needed into a folder to make it portable.

I tried to replace some of your icons, editing the excell .dat file. I succeeded with just one out of 4 icons (a pref icon, third from the right) and don´t know why (they are still written down at the excell .dat). I also couldn´t figure out if the 24 pixels is default and if I could overwrite it.

Talking about menuBars, it would be nice if you could elaborate a bit more. The tooltips are self-explanatory and are working rock-solid. It´s a nice bonus!


My first impression is so far well above my expectations. MasmBasic is huge and the entry point needs some digging (and that´s why this tutorial). There are times where one needs to just go for it. MasmBasic allows us to stay into the asm enviroment, but with the HLL productivity of some other languages. I can´t wait to see more developments in the GuiControls. That´s the catch.

The immediate right-click help for masmbasic when working with Richmasm is great! I´m using all the time. Not to mentioned that deb4 is my newest pal.
Congratulations Jochen, amazing work.

ps: http://masm32.com/board/index.php?topic=6890.msg73796#new  <== Check this out. I found a solution in a free app. But I could simply hava done it with a GuiControl excell.... That´s what I mean.
ps2: it´s worth those extra 20kb... :badgrin:

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8736
  • Assembler is fun ;-)
    • MasmBasic
Re: SlimViewer, project in MasmBasic
« Reply #16 on: February 06, 2018, 06:48:55 PM »
1.
Quote
   GuiParas equ "SlimViewer", x650, y20, w800, h900, c black,  b 555555h      ; Last item == Bk colour
    ; GuiParas equ "SlimViewer", xr5, y5, w800, h-5, b RgbCol(160, 255, 200), m3   ; x right-aligned 5px, y5px, width 800, height-5px
The line below was taken from one of your examples. It´s a more elaborate function, with alignment. How many more things like that there is? And what´s the meaning of "m3"?

m3 is margin 3px. Try m30 to see the difference. For "more things", check GetGP macro in the include file; but you pretty much covered it.

Quote
2. As you already know by my .asc files, I like the dark interface, kind of Visual-you-Know.. I managed to set my control´s backgrounds (including the treeView) dark, but couldn´t find a way to do it for the ComboBox (which appears to be a bit difficult) and the GuiControl static "labels" text to white. And out-of-curiosity, can the BKground of the Status and menu be darkened too?

Probably, using the appropriate functions and messages, such as WM_CTLCOLOR etc.

Quote
3. If you run my *.exe, I´m recalling a .asc file (thus richtext). Although our filtre is doing a fine job when it comes to text files (asm), it´s getting richtext stuff like \tabs. I know when within the plugin enviroment, one can fetch a text format instead of the richtext. Is that the case or I must think of richText format hunting?

                ; Recall "slimViewer.asc", L$()                 ; Hard coded only to test the instructions
                GuiControl MyRE, "Richedit", x0, y0, h0, w0
                invoke ShowWindow, hMyRE, SW_HIDE
                SetWin$ hMyRE=FileRead$("slimViewer.asc")
                StringToArray Win$(hMyRE), L$()
;)

Quote
4. MenuBar!  I did a bit of hacking and managed to pull it into the prog. Nice! I placed everything needed into a folder to make it portable.

I tried to replace some of your icons, editing the excell .dat file. I succeeded with just one out of 4 icons (a pref icon, third from the right) and don´t know why (they are still written down at the excell .dat). I also couldn´t figure out if the 24 pixels is default and if I could overwrite it.

Talking about menuBars, it would be nice if you could elaborate a bit more. The tooltips are self-explanatory and are working rock-solid. It´s a nice bonus!

I was surprised to see it in your app - you are learning really fast :icon14:
Re icons, I would have to check my old files how I did it. May take a while since I am very busy right now.

What I can see so far is that your xlsx file is current, but GuiData\IdeData.tab is old. MB cannot read the complex xlsx format, it needs simple tab-delimited plain text. So you need to export your edits. Inside the spreadsheet, line 43 contains the instructions which icon to use where:
USE: [45D2  016GC  78  AB  Ee100 He100 s200]
You recognise the structure of the toolbar...? The numbers and letters are the first column in line 49ff.

Quote
My first impression is so far well above my expectations. MasmBasic is huge and the entry point needs some digging (and that´s why this tutorial). There are times where one needs to just go for it. MasmBasic allows us to stay into the asm enviroment, but with the HLL productivity of some other languages. I can´t wait to see more developments in the GuiControls. That´s the catch.

The most common controls are "implemented"; in reality, all controls can be created, but you may have to use more low-level calls to program them. SendMessage is your friend ;-)

Quote
The immediate right-click help for masmbasic when working with Richmasm is great! I´m using all the time. Not to mentioned that deb4 is my newest pal.
Congratulations Jochen, amazing work.

Thanks ;-)

Quote
I could simply hava done it with a GuiControl excell.... That´s what I mean.
ps2: it´s worth those extra 20kb... :badgrin:

I can't use that name, of course. What do you suggest? Attached some work in progress. Select a cell and type e to edit it. The scroll bars are not working, it's damn complex, unfortunately. What's the best name for it?
GuiControl MyData, "table", ...
GuiControl MyData, "spreadsheet", ...
GuiControl MyData, "grid", ...

LordAdef

  • Member
  • ****
  • Posts: 590
Re: SlimViewer, project in MasmBasic
« Reply #17 on: February 07, 2018, 07:29:01 AM »
I like GuiControl MyData, "grid"  a lot, but maybe GuiControl MyData, "spreadsheet" is more indicative and clearer.

And grid may be used later for some grid macro yet to come  :biggrin: