Page 1 of 2

Libs : dashed splitterbar & requester position ( PB 3.94

Posted: Mon Jul 25, 2005 8:40 pm
by eddy
[PB 3.94] download : here ( Extract to your PB folder and restart your PB compiler. )

This zip file contains two precompiled libs :
- set requester position ( works with ALL purebasic requesters !! )
- dashed bar ( a kind of splitter bar within border-snap )

DashedBar feature:
- skinnable grip button ( each bar can be skinned )
- snapping border
- swap gadgets
- replace gadget
- hand cursor
- new eventtype

Image

Posted: Mon Jul 25, 2005 9:08 pm
by Progi1984
Hi eddy, again a good job ! ;)

Posted: Mon Jul 25, 2005 10:29 pm
by Blade
Nice!
Request:
When the mouse is over the "border snap", the mouse cursor will be the "hand" type. (so you know you can start dragging)

Posted: Mon Jul 25, 2005 11:49 pm
by eddy
> hand cursor

OK I'll do it.

> found bug

DashedBarAttribute(#DASHBAR,0,0,#DashedBar_FavoriteBorder2)
If your favorite border is the second one, dbl-click should hide/restore the second gadget. But it does not work. :?

> idea

Ill simply the control. Dbl-click is too boring

Posted: Wed Jul 27, 2005 4:31 pm
by eddy
[UPDATED]
- default button shape
- skinnable button

:)

Posted: Wed Jul 27, 2005 7:16 pm
by DoubleDutch
Is the source available for your new gadget?

Posted: Wed Jul 27, 2005 7:44 pm
by eddy
There's no code available in this zip

It's a hack of ButtonGadget.
The code looks like that : viewtopic.php?t=13145&highlight=buttonskin

Posted: Sun Jul 31, 2005 4:55 am
by eddy
[updated]
- removed temporary window
- improved dashedbar snap
- new DashedBarGadget parameter :
DashedBarGadget(ID, x, y, width, height, GripThickness, GripLength, ID1, ID2, flag)

Posted: Sun Jul 31, 2005 5:05 pm
by Andre
@eddy: it took some time, but your lib is now also listened on PureArea.net :wink:

Posted: Sun Jul 31, 2005 7:52 pm
by eddy
great ! ;)

Posted: Wed Aug 03, 2005 3:42 pm
by eddy
ToDo:
--------
- DashedBarSwapGadgets
- New EventTypes ( Dashedbar_SnapBorder1, Dashedbar_SnapBorder2)
- fix invisible gadget background

I love this gadget. I works perfectly. :twisted:

Posted: Tue Aug 23, 2005 2:00 pm
by neotoma
eddy wrote: I love this gadget. I works perfectly. :twisted:
ent_CloseWindow
Yeah, it really nice.

But at the moment i'm trying to make 3-Panel-Window, with two vertical splitters. And i don't know how to do this...
My try with your DashedBar :

Code: Select all

Enumeration
  #GADGET1 
  #GADGET2 
  #GADGET3
  #DASHBAR  
  #DASHBAR2
EndEnumeration

OpenWindow(0,100,100,300,300,#PB_Window_SystemMenu|#PB_Window_SizeGadget,"dashed bar") 
CreateGadgetList(WindowID()) 
ButtonGadget(#GADGET1,0,0,0,0,"left") 
ButtonGadget(#GADGET3,0,0,0,0,"middle") 
ButtonGadget(#GADGET2,0,0,0,0,"right")
DashedBarGadget(#DASHBAR,5,5,290,290,6,100,#GADGET1,#GADGET3,#DashedBar_Vertical) 
DashedBarGadget(#DASHBAR2,100,5,290,290,6,100,#GADGET3,#GADGET2,#DashedBar_Vertical) 
DashedBarAttribute(#DASHBAR,32,32,#DashedBar_FavoriteBorder2)

;set dashed bar size
SetGadgetState(#DASHBAR,80)
Debug "state="+Str(GetGadgetState(#DASHBAR))

Repeat 
  e=WaitWindowEvent()
  
  ;resize gadget
  If e=#PB_Event_SizeWindow
    UseWindow(0)
    w=WindowWidth()
    h=WindowHeight()
    ResizeGadget(#DASHBAR,5,5,w-10,h-10)
  EndIf
  
Until e=#PB_Event_CloseWindow

Mike

Posted: Wed Aug 24, 2005 1:16 pm
by eddy
Like that :

Code: Select all

Enumeration 
   #GADGET1 
   #GADGET2 
   #GADGET3 
   #DASHBAR  
   #DASHBAR2 
EndEnumeration 

; ======================================
; EXAMPLE : 3-Panel-Window 
; ======================================

OpenWindow(0,100,100,300,300,#PB_Window_SystemMenu|#PB_Window_SizeGadget,"dashed bar") 
CreateGadgetList(WindowID()) 

; [LEFT | MIDDLE | MIDDLE]
ButtonGadget(#GADGET1,0,0,0,0,"left") 
ButtonGadget(#GADGET3,0,0,0,0,"middle") 
ButtonGadget(#GADGET2,0,0,0,0,"right") 

;SECONDARY dashedbar [LEFT | MIDDLE]
DashedBarGadget(#DASHBAR,5,5,290,290,6,100,#GADGET1,#GADGET3,#DashedBar_Vertical) 
DashedBarAttribute(#DASHBAR,32,32,#DashedBar_FavoriteBorder1) 
SetGadgetState(#DASHBAR,290/3-6)

;MAIN dashedbar [.... | RIGHT]
DashedBarGadget(#DASHBAR2,5,5,290,290,6,100,#DASHBAR,#GADGET2,#DashedBar_Vertical)  
DashedBarAttribute(#DASHBAR2,32,32,#DashedBar_FavoriteBorder2) 
SetGadgetState(#DASHBAR2,2*290/3-6)

Repeat 
   e=WaitWindowEvent() 
   
   ;resize MAIN dashedbar
   If e=#PB_Event_SizeWindow 
      UseWindow(0) 
      w=WindowWidth() 
      h=WindowHeight() 
      ResizeGadget(#DASHBAR2,5,5,w-10,h-10) 
   EndIf 
   
Until e=#PB_Event_CloseWindow
| EDIT | code fixed

Posted: Wed Aug 31, 2005 10:55 pm
by eddy
[ Released ]

version : 1.1
- added 3-panel example :)
- improved dashedbar scrolling ( removed visual glitches and reduced flickering )
- added new command : DashedBarSwapGadgets
- updated help : DashedBarGadget flag is optional now

| EDIT | last minute fix

Posted: Sun Sep 04, 2005 10:31 pm
by eddy
[Released]

- optional parameter for SwapGadget : dontMoveBar
- optional parameter for SwapGadget : dontChangeFavoriteBorder
- Fixed bug : if you use #PB_any
- Fixed bug : multiple bar activations