Libs : dashed splitterbar & requester position ( PB 3.94

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Libs : dashed splitterbar & requester position ( PB 3.94

Post 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
Last edited by eddy on Fri Aug 31, 2007 10:43 pm, edited 19 times in total.
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

Hi eddy, again a good job ! ;)
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post 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)
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post 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
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

[UPDATED]
- default button shape
- skinnable button

:)
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Is the source available for your new gadget?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post 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
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

[updated]
- removed temporary window
- improved dashedbar snap
- new DashedBarGadget parameter :
DashedBarGadget(ID, x, y, width, height, GripThickness, GripLength, ID1, ID2, flag)
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2139
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Post by Andre »

@eddy: it took some time, but your lib is now also listened on PureArea.net :wink:
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

great ! ;)
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

ToDo:
--------
- DashedBarSwapGadgets
- New EventTypes ( Dashedbar_SnapBorder1, Dashedbar_SnapBorder2)
- fix invisible gadget background

I love this gadget. I works perfectly. :twisted:
Last edited by eddy on Wed Aug 31, 2005 3:33 pm, edited 1 time in total.
neotoma
User
User
Posts: 84
Joined: Sun Dec 14, 2003 6:38 pm
Location: Germany, Mechernich
Contact:

Post 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
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post 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
Last edited by eddy on Wed Aug 31, 2005 11:09 pm, edited 2 times in total.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post 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
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post 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
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
Post Reply