PureRESIZE library : gadget automatic resizing and more
Moderator: gnozal
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Library update
- fixed : in some cases, some gadgets didn't resize correctly, because some #WM_SIZE events were lost in the callback (bug ?). I have added a hack to correct this.
- new : PureRESIZE_SizeWindow() to manually resize a window.
To download, see first post of thread
- fixed : in some cases, some gadgets didn't resize correctly, because some #WM_SIZE events were lost in the callback (bug ?). I have added a hack to correct this.
- new : PureRESIZE_SizeWindow() to manually resize a window.
To download, see first post of thread
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Library update
Changes :
- renamed SizeWindow() to ResizeWindowNow()
- new optional parameter ParentGadget for PureRESIZE_SetGadgetResize()
By default, the gadget is resized when his window is resized. If a parent gadget is specified, the gadget is resized when the parent gadget is resized.
This is very usefull when working with container and splitter gadgets (see example file 4).
Download :
http://people.freenet.de/gnozal/PureRESIZE.zip
Changes :
- renamed SizeWindow() to ResizeWindowNow()
- new optional parameter ParentGadget for PureRESIZE_SetGadgetResize()
By default, the gadget is resized when his window is resized. If a parent gadget is specified, the gadget is resized when the parent gadget is resized.
This is very usefull when working with container and splitter gadgets (see example file 4).
Download :
http://people.freenet.de/gnozal/PureRESIZE.zip
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
A big Thanks
This lib is such a great time saver.
Thank you for making it and sharing it !!!
I am using it in a editor that I am writting for PB/B3D and BMax.
Keep up the wonderful work.
Thank you for making it and sharing it !!!
I am using it in a editor that I am writting for PB/B3D and BMax.
Keep up the wonderful work.
Ziltch - http://www.youtube.com/user/OZiltch
new request
My purpose is to remove a flickering source.
I need a flag #PureRESIZE_Monitoring_DontDrawContent for this command:
Thx in advance

I need a flag #PureRESIZE_Monitoring_DontDrawContent for this command:
Here is some infos to help youPureRESIZE_SetWindowMonitoring( WindowNumber, #PureRESIZE_Monitoring_DontDrawContent )
Code: Select all
;*******************************************
; READ ME
;uncomment this line if you dont want to force the Full-Drawing mode :
;*******************************************
;SystemParametersInfo_( #SPI_SETDRAGFULLWINDOWS, 1, 0, #SPIF_SENDWININICHANGE)
;
;Get state of Full-Drawing mode
Global CurrentDrawMode
Global DrawLocked
SystemParametersInfo_( #SPI_GETDRAGFULLWINDOWS, 0, @CurrentDrawMode, 0) ;-> CurrentDrawMode=1
#WM_CAPTURECHANGED=$215
Procedure CB(Window, Message, wParam, lParam)
Result = #PB_ProcessPureBasicEvents
If Window=WindowID(0)
Select Message
Case #WM_NCLBUTTONDOWN
If DrawLocked=0
;disable full-drawing mode
SystemParametersInfo_( #SPI_SETDRAGFULLWINDOWS, 0, 0, #SPIF_SENDWININICHANGE)
Debug "disable"
DrawLocked=1
EndIf
Case #WM_CAPTURECHANGED
Debug "capture changed"
If DrawLocked And lParam<>Window
;restore full-drawing mode
SystemParametersInfo_( #SPI_SETDRAGFULLWINDOWS, CurrentDrawMode, 0, #SPIF_SENDWININICHANGE )
Debug "enable"
DrawLocked=0
EndIf
EndSelect
EndIf
ProcedureReturn Result
EndProcedure
If OpenWindow(0,100,100,200,200,#PB_Window_SystemMenu|#PB_Window_SizeGadget,"No Drawing") And CreateGadgetList(WindowID(0))
OpenWindow(1,400,100,200,200,#PB_Window_SystemMenu|#PB_Window_SizeGadget,"Full Drawing") And CreateGadgetList(WindowID(0))
SetWindowCallback(@CB())
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf
Thx in advance



Last edited by eddy on Fri Sep 02, 2005 3:38 am, edited 2 times in total.

-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: new request
Ok, I will see what I can do ; I am not sure it is compatible with the actual library code.eddy wrote:My purpose is to remove a flickering source.
I need a flag #PureRESIZE_Monitoring_DontDrawContent for this command:PureRESIZE_SetWindowMonitoring( WindowNumber, #PureRESIZE_Monitoring_DontDrawContent )
About the flickering : I had to add some RedrawWindow_() and other dirty tricks in the code because in some situations the window wasn't redrawn and/or some gadgets weren't resized, at least with the older PB versions.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Re: new request
It's true, this code should be in PureRESIZE_CallBack.gnozal wrote:Ok, I will see what I can do ; I am not sure it is compatible with the actual library code.
You could add a new command like this :
Code: Select all
PureRESIZE_HideWindowResizing(WindowNumber.l, flag.l
- #TRUE
- #FALSE
)

-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Library update
Changes :
- fixed PureRESIZE_SetWindowMaximumSize(), wich was broken since a few updates ;
- changed resize code : removed some old useless (I hope !) code; less RedrawWindow_() calls, so hopefully less flicker.
Changes :
- fixed PureRESIZE_SetWindowMaximumSize(), wich was broken since a few updates ;
- changed resize code : removed some old useless (I hope !) code; less RedrawWindow_() calls, so hopefully less flicker.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
You should make some of your work 'donation-ware' you know, considering how many of us are using your excellent tools.
Either way, happy xmas.
{How'd you remove the callback by the way? I presume you're linking your own callback in somewhere along the line! -Just being nosey!
}
Either way, happy xmas.
{How'd you remove the callback by the way? I presume you're linking your own callback in somewhere along the line! -Just being nosey!

I may look like a mule, but I'm not a complete ass.
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Thankssrod wrote:You should make some of your work 'donation-ware' you know, considering how many of us are using your excellent tools.
Either way, happy xmas.

Yes. Like in the two other libs (PureCOLOR and PureLVSORT), I did a lot of subclassing. I just hope it works as beforesrod wrote:{How'd you remove the callback by the way? I presume you're linking your own callback in somewhere along the line! -Just being nosey!}

For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
ThanksKiffi wrote:Great! gnozal, i love you!

No, I don't. I don't need to make money with programming, I am not a professional programmer, it's more a hobby.Kiffi wrote:Do you have a paypal-Account?Greetings ... Kiffi
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).