yaPBVD

Developed or developing a new product in PureBasic? Tell the world about it.
MrMat
Enthusiast
Enthusiast
Posts: 762
Joined: Sun Sep 05, 2004 6:27 am
Location: England

Post by MrMat »

The only minor problem i noticed is that if you put 2 or more gadgets on the window and then right click on Window_0 and select Delete Object then 1 of the gadgets is left.

Do you have plans to add alignment tools in the future? ie. it would be useful if you could select multiple gadgets and left/right/top/bottom align them, space them equally horizontally/vertically or centre them horizontally/vertically. If they could be moved a pixel by pressing the cursor keys would also be great. I don't want to pile up work for you though ;)
Mat
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

- pressing Escape to delete Gadgets would be fine
- You can resize the Tool-Windows width :(
- Resizing the Window should update the values in the "propiedades" (From where are you actually?)
- You should not only disable Properties but hide them (only my humble opinion). Example: min/max-values
- when minimizing/maximizing all windows should be affected. Actually you have to maximize each one manually
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

Beach wrote: it would be nice to be able to associate the ".yav" files to the app so one could just double click the project file to bring up the project
ADDED!

MrMat wrote:The only minor problem i noticed is that if you put 2 or more gadgets on the window and then right click on Window_0 and select Delete Object then 1 of the gadgets is left.
FIXED!
MrMat wrote:Do you have plans to add alignment tools in the future?....
Yes!! yes!
FreeDimension wrote: (FIXED!) - You can resize the Tool-Windows width
(FIXED! I think) - Resizing the Window should update the values in the "propiedades" (From where are you actually?)

(FIXED!)- when minimizing/maximizing all windows should be affected. Actually you have to maximize each one manually

I am studying your other options, but I don't know when they will be ready.

And.... other news:
-new gadget (ButtonImage) :D
- Bugs Fixed

http://usuarios.arsystel.com/mga2002/pb/yaPBVD.zip
Last edited by zikitrake on Wed Oct 20, 2004 6:55 pm, edited 1 time in total.
PB 6.21 beta, PureVision User
PolyVector
Enthusiast
Enthusiast
Posts: 499
Joined: Wed Sep 17, 2003 9:17 pm
Location: Southern California
Contact:

Post by PolyVector »

@zikitrake...
Sorry if this is a bit off topic, but I recently found out about some undocumented WM_SYSCOMMAND params... They can be used to resize controls... Because windows is handling the resizing, it will act differently depending on the "Show window contents while dragging" setting...
Anyways, I found it interesting...

Code: Select all

#SC_SizeLeft              = $F001
#SC_SizeRight           = $F002
#SC_SizeTop             = $F003
#SC_SizeTopLeft       = $F004
#SC_SizeTopRight     = $F005
#SC_SizeBottom         = $F006
#SC_SizeBottomRigh  = $F008
#SC_SizeBottomLeft   = $F007
#SC_DragMove          = $F012
SendMessage_(GadgetID(1),#WM_SYSCOMMAND,#SC_SizeRight,0)
You could probably just handle the #WM_LBUTTONDOWN event with one of these variations...
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

Hi, PolyVector... and thank you.

I'm experimenting and I have a question:

Somebody knows how to draw the rectangle in steps of 5 (or 10, 20) pixels (for GRID SNAPPED function)

Code: Select all

#SC_SizeLeft         = $F001 
#SC_SizeRight        = $F002 
#SC_SizeTop          = $F003 
#SC_SizeTopLeft      = $F004 
#SC_SizeTopRight     = $F005 
#SC_SizeBottom       = $F006 
#SC_SizeBottomRight  = $F008 
#SC_SizeBottomLeft   = $F007 
#SC_DragMove         = $F012 
 

OpenWindow(0, 10, 10, 200, 250, #PB_Window_SystemMenu,"A Window")
  CreateGadgetList(WindowID())
  BTN_ID = ButtonGadget(1,30,30,150,200,"ClickMe and Dragme or Resizeme", #PB_Button_MultiLine)

Repeat
  
  EventID.l = WaitWindowEvent()

  If  EventType() = #PB_EventType_LeftClick
    SendMessage_(BTN_ID, #WM_SYSCOMMAND,#SC_SizeBottomRight,0)
  EndIf
  
Until EventID = #PB_Event_CloseWindow 
PB 6.21 beta, PureVision User
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

zikitrake wrote:Hi, PolyVector... and thank you.

I'm experimenting and I have a question:

Somebody knows how to draw the rectangle in steps of 5 (or 10, 20) pixels (for GRID SNAPPED function)
Rectangle == Windows?

There are Messages that can handle the resizing and moving of windows:

#WM_SIZING
#WM_MOVING

With these you get a pointer to a RECT Structure that you can alter to the values you need.

But, like PolyVector indicated already, if you have "Show window contents while dragging" checked, it will behave different, at least with #WM_MOVING.
Common workaround is to disable this feature for the time of Resizing/Dragging (IMHO even Photoshop does it this way). But this needs thorough programming, as users don't like their system settings to be altered permanently.

Code: Select all

Drag.l
SystemParametersInfo_(#SPI_GETDRAGFULLWINDOWS,0,@Drag,0)
...
...
...
SystemParametersInfo_(#SPI_SETDRAGFULLWINDOWS, Drag, 0, #SPIF_SENDWININICHANGE)
MrMat
Enthusiast
Enthusiast
Posts: 762
Joined: Sun Sep 05, 2004 6:27 am
Location: England

Post by MrMat »

This works but there may be a better method:

Code: Select all

#SC_SizeLeft         = $F001
#SC_SizeRight        = $F002
#SC_SizeTop          = $F003
#SC_SizeTopLeft      = $F004
#SC_SizeTopRight     = $F005
#SC_SizeBottom       = $F006
#SC_SizeBottomRight  = $F008
#SC_SizeBottomLeft   = $F007
#SC_DragMove         = $F012

Global OldButtonProc, GridSize

GridSize = 40

OpenWindow(0, 10, 10, 200, 250, #PB_Window_SystemMenu,"A Window")
  CreateGadgetList(WindowID())
  BTN_ID = ButtonGadget(1, 30, 30, 150, 200, "ClickMe and Dragme or Resizeme", #PB_Button_MultiLine)

Procedure ButtonProc(hWnd, uMsg, wParam, lParam)
  result = 0
  If uMsg = #WM_SIZING
    *Size.RECT = lParam
    *Size\right = *Size\left + GridSize * Int((*Size\right - *Size\left) / GridSize)
    *Size\bottom = *Size\top + GridSize * Int((*Size\bottom - *Size\top) / GridSize)
    result = #True
  Else
    result = CallWindowProc_(OldButtonProc, hWnd, uMsg, wParam, lParam)
  EndIf
  ProcedureReturn result
EndProcedure
  
OldButtonProc = SetWindowLong_(BTN_ID, #GWL_WNDPROC, @ButtonProc())

Repeat

  EventID.l = WaitWindowEvent()

  If  EventType() = #PB_EventType_LeftClick
    SendMessage_(BTN_ID, #WM_SYSCOMMAND, #SC_SizeBottomRight, 0)
  EndIf

Until EventID = #PB_Event_CloseWindow
Mat
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

Beach wrote:Oh, and it would be nice to have a repeat loop option with all the gadgets for lazy folks like me... :)
ADDED!

Now yaPBVD generate an Auto Loop File... if you want :wink:


http://usuarios.arsystel.com/mga2002/pb/yaPBVD.zip
PB 6.21 beta, PureVision User
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post by Beach »

Oh yeah! Thanks zikitrake!
MrMat
Enthusiast
Enthusiast
Posts: 762
Joined: Sun Sep 05, 2004 6:27 am
Location: England

Post by MrMat »

It's really good! :D

A few minor bugs:
The tree view is cut off at the bottom of the left window (Win XP).
If you right click on a string gadget, every second click you can get a popup menu appear with 'undo, cut, copy, paste, etc.' and then you can change the text eg. 'string_0' that appears in the gadget.
If you resize a window as small as it will go (dragging from the bottom right hand corner), let go of the mouse, then enlarge it again, it has a completely black background (only when the grid is displayed).
If you select a gadget and then click inside a string gadget in the left hand window the wrong cursor appears until you move the mouse.
Selecting WindowCentered hides the gadgets in the window.
Selecting Window_0 doesn't change the properties gadget (but it works if you click the background of the window).
If a gadget is under or on top of another gadget then the corner resizing box isn't visible (but it can still be resized).
When resizing the window using the width and height boxes there is a minimum size but when resizing the window manually there isn't.
Mat
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

MrMat wrote:It's really good! :D

A few minor bugs:
1- The tree view is cut off at the bottom of the left window (Win XP).
2- If you right click on a string gadget, every second click you can get a popup menu appear with 'undo, cut, copy, paste, etc.' and then you can change the text eg. 'string_0' that appears in the gadget.
3- If you resize a window as small as it will go (dragging from the bottom right hand corner), let go of the mouse, then enlarge it again, it has a completely black background (only when the grid is displayed).
4- If you select a gadget and then click inside a string gadget in the left hand window the wrong cursor appears until you move the mouse.
5- Selecting WindowCentered hides the gadgets in the window.
6- Selecting Window_0 doesn't change the properties gadget (but it works if you click the background of the window).
7- If a gadget is under or on top of another gadget then the corner resizing box isn't visible (but it can still be resized).
8- When resizing the window using the width and height boxes there is a minimum size but when resizing the window manually there isn't.
1- FIXED
2- FIXED
3- I CAN'T REPRODUCE THIS ERROR :?
4- FIXED
5- FIXED
6- FIXED
7- NOT YET, I WANT CHANGE RESIZING BOX METHOD
8- FIXED (CHANGED, NO MORE MINIMUM HEIGHT SIZE)

And the news
- Add ImageGadget
- Bugsfixed

http://usuarios.arsystel.com/mga2002/pb/yaPBVD.zip


Thank you for comments
PB 6.21 beta, PureVision User
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Excellent work :D
Could you add language support, so it could be translated ?
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

gnozal wrote:Excellent work :D
Could you add language support, so it could be translated ?
Yes!, I have thought to add it ... but later. (I speak Spanish and my (English) is very limited :oops:
PB 6.21 beta, PureVision User
MrMat
Enthusiast
Enthusiast
Posts: 762
Joined: Sun Sep 05, 2004 6:27 am
Location: England

Post by MrMat »

Great work!
zikitrake wrote:3- I CAN'T REPRODUCE THIS ERROR :?
I can't reproduce it in the new version but sometimes when resizing the grid doesn't draw quite right:

Image
Mat
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

MrMat wrote:.. but sometimes when resizing the grid doesn't draw quite right
FIXED!, but it will appear in the next version. Now I am working with the Panelgadget (hard work :twisted: )

Can someone help me with this? viewtopic.php?t=12856
PB 6.21 beta, PureVision User
Post Reply