News:

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

Main Menu

Edit Tabs

Started by HSE, November 19, 2015, 03:11:16 AM

Previous topic - Next topic

HSE

Hi!

Somebody remeber if there is some option to change tabs from singleline to multiline?

Apparently the code admit the 2 options, but I don`t known if was implemeted:

test da.win.fView,VIEW_MULTITAB
.if ZERO?
mov edx,WS_VISIBLE or WS_CHILD or WS_CLIPSIBLINGS or WS_CLIPCHILDREN or TCS_FOCUSNEVER or TCS_BUTTONS
.else
mov edx,WS_VISIBLE or WS_CHILD or WS_CLIPSIBLINGS or WS_CLIPCHILDREN or TCS_FOCUSNEVER or TCS_BUTTONS or TCS_MULTILINE
.endif
invoke CreateWindowEx,0,addr szTabControlClassName,NULL,edx,0,0,0,0,ha.hToolTab,0,ha.hInstance,0
mov ha.hTab,eax



Its not a critical issue because there is no problem to modify the code but, I think, important in terms of RADasm software development.

Thanks. HSE
 
Equations in Assembly: SmplMath

ragdog

Hello Hse

Go in menu Option>> Code editor

you find a option check box "Multiline tabtool" bottom left

Check it and push Apply

HSE

Hi Ragdog!!

Perhaps a time ago I try that check box and I don`t see the change, surely I was expecting tab resizing.

Thanks a lot. HSE
Equations in Assembly: SmplMath

ragdog

Change the size from tab control a little




HSE

Yes, thanks. I was thinking in automatic resizing.  It's a task for the future, but the tabcontrol is already subclassed.
Equations in Assembly: SmplMath

HSE

Oh, oh! Not so simple: the tab control is in a wrapper, and the wrapper is not controled by his window parent but from a "controler window" through a "docking structure" :icon_eek:.  Apparently this is what allow to move windows without need of MDI.  There is a name for this kind of architecture? And some more explained (and perhaps simple) example?

Thanks. HSE
Equations in Assembly: SmplMath

HSE

#6
Hello! Nobody here?

Ok, is a very specific issue  :icon_eek:

I found some other KetilO's examples at https://fbedit.svn.sourceforge.net/svnroot/fbedit/

Interesting thing is that MasmEd (the previous KetilO's IDE) make automatic adjusting of tabs. In developing the new architecture that feature was removed.

Now RadAsm make the adjust (I think a little better than MasmEd), but is semiautomatic because I'm still working in trigger the refresh ( at this moment I need to activate some tool caption).

Regards. HSE 
Equations in Assembly: SmplMath

ragdog

#7
Hello

Ok thanks for the bug Info but is open source to fix it

ragdog

Hello

The Tabs Multiline Autosize bug is here it do not update the TabControl to the new size.


test da.win.fView,VIEW_MULTITAB
.if ZERO?
mov edx,WS_VISIBLE or WS_CHILD or WS_CLIPSIBLINGS or WS_CLIPCHILDREN or TCS_FOCUSNEVER or TCS_BUTTONS
.else

mov edx,WS_VISIBLE or WS_CHILD or WS_CLIPSIBLINGS or WS_CLIPCHILDREN or TCS_FOCUSNEVER or TCS_BUTTONS or TCS_MULTILINE
.endif
invoke SetWindowLong,ha.hTab,GWL_STYLE,edx
.endif
retn

KeyWordsProc endp


HSE

#9
Hi Ragdog!!

I think there is no bug, the feature is just missing.

There is some complications:
1) SysTabControl32 don't autosize
2) KetilO Tool system is mouse driven only
3) It's a complex system:
    a) 3 differente window classes, each one subclassed
    b) 3 additional procedures to manage messages between subclasses
    c) each tool have 7 different RECT structures

I make some changes...

In RATools.lib:

RATools.inc

TLT_GENERAL             equ 0       ; <------------------------------ NEW
TLT_CONTROLTAB       equ 1       ; <------------------------------ NEW

TOOL struct
dck DOCKING <>
dr RECT <> ;Docked
wr RECT <> ;Child window
rr RECT <> ;Resize
tr RECT <> ;Top
cr RECT <> ;Caption
br RECT <> ;Close button
dType dd ?        ; <------------------------------ NEW
dFocus dd ?
dCurFlag dd ?
hWin         dd ?
hCld dd ?
        hChild                               dd ?        ; <------------------------------ NEW
lpfnOldCldWndProc dd ?
TOOL ends


Tool.asm .elseif eax==TLM_ADJUSTRECT    ; in ToolMsg proc
.if [esi].TOOL.dType == TLT_CONTROLTAB
invoke SendMessage,[esi].TOOL.hChild, TCM_GETROWCOUNT, FALSE,FALSE
mov renglones , eax
invoke SendMessage,[esi].TOOL.hChild,TCM_GETITEMRECT,0, addr rect2
mov eax , rect2.bottom
add eax , 2
mov ecx , renglones
.if ecx == 0
inc ecx
.endif
mul ecx
mov [esi].TOOL.dck.dHeight, eax
.endif
.if [esi].TOOL.dck.Visible && [esi].TOOL.dck.Docked


In RADasm30:

Tools.asm test da.win.fView,VIEW_MULTITAB
.if ZERO?
mov      eax , ha.hToolTab
call    GetToolPtr
mov [edx].TOOL.dType, TLT_GENERAL
mov edx,WS_VISIBLE or WS_CHILD or WS_CLIPSIBLINGS or WS_CLIPCHILDREN \
or TCS_FOCUSNEVER or TCS_BUTTONS
.else
mov      eax,ha.hToolTab
call    GetToolPtr
mov [edx].TOOL.dType, TLT_CONTROLTAB
mov edx,WS_VISIBLE or WS_CHILD or WS_CLIPSIBLINGS or WS_CLIPCHILDREN \
or TCS_FOCUSNEVER or TCS_BUTTONS or TCS_MULTILINE or \
                                         TCS_RIGHTJUSTIFY

.endif
invoke CreateWindowEx,0,addr szTabControlClassName,NULL,\
                               edx,0,0,0,0,ha.hToolTab,0,ha.hInstance,0
mov ha.hTab,eax

push eax                                        ;  <-----  I forget this little piece
mov eax , ha.hToolTab
invoke GetToolPtr
pop eax   
mov [edx].TOOL.hChild, eax


KeyWord.asm
test da.win.fView,VIEW_MULTITAB
.if ZERO?
mov      eax , ha.hToolTab
call    GetToolPtr
mov [edx].TOOL.dType, TLT_GENERAL
mov edx,WS_VISIBLE or WS_CHILD or WS_CLIPSIBLINGS or \
                                              WS_CLIPCHILDREN or TCS_FOCUSNEVER or TCS_BUTTONS
.else
mov      eax , ha.hToolTab
call    GetToolPtr
mov [edx].TOOL.dType, TLT_CONTROLTAB
mov edx,WS_VISIBLE or WS_CHILD or WS_CLIPSIBLINGS or WS_CLIPCHILDREN\
                                               or TCS_FOCUSNEVER or TCS_BUTTONS or TCS_MULTILINE
.endif
invoke SetWindowLong,ha.hTab,GWL_STYLE,edx


After adding or deleting an item (that change tab row number) all the system need to be recalculated. I'm failing in to trigger that action :(, only clicking some caption it's posible until now :biggrin:.

Regards. HSE 
Equations in Assembly: SmplMath

ragdog

Can you upload a compiled exe?

Thanks

HSE

#11
Hi Ragdog!!

I was forgetting some pieces (see previous post).

file updated in http://masm32.com/board/index.php?topic=5980.msg66174#msg66174
Equations in Assembly: SmplMath

ragdog

Thanks Hse

But i have test it but it not works with Tab autosize if i change in Option>>> CodeEditor>> MultiLine tabs and apply

HSE

After that, you need to activate some tool caption with the mouse. That is the problem.

The same is true when adding or deleting files to the editor. Actualization requiere mouse action.
Equations in Assembly: SmplMath

HSE

#14
Hi Ragdog!

I found there is some messages to tools from menu.


I used the message to show/hide tools in TabProc (TabTools.asm)

at first:

        mov           eax, uMsg
        push           eax


after the default CallBack:
mov ebx , eax
pop eax
push ebx
.if eax ==TCM_DELETEITEM || eax == TCM_SETITEM

invoke SendMessage, ha.hTool, TLM_HIDE, 0, ha.hToolTab
invoke SendMessage, ha.hTool, TLM_HIDE, 0, ha.hToolTab

.endif
pop eax


the solution is very ugly, but it's a beginning

file updated in http://masm32.com/board/index.php?topic=5980.msg66174#msg66174
Equations in Assembly: SmplMath