gDesign - Visual Gadget Designer

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Droopy wrote:The same lib without need of init function
You don't call gDesign_Init(). Set the name ob the lib to gDesign.pbi, the call is automatic by using any Function
:wink:
I see, you have renamed the initfunction, that doesn't work :!:
TailBite.chm wrote: ProcedureDLL MyLib_Init()
; Do some initializing stuff, allocate memory, etc.
EndProcedure

ProcedureDLL MyLib_End()
; Do some cleaning, free memory, unload third party DLLs, etc.
EndProcedure
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Droopy
Enthusiast
Enthusiast
Posts: 658
Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:

Post by Droopy »

@Ts-Soft : gDesignInit is called by the gDesignMaxItem function internally.
I think it's the first function the user call .

It works, here the lib File:1->GDesign
Image

and a test for the Lib :

Code: Select all

Dim ItemIndex.l(gDesignMaxItem(?gadgets))

;/ Spécify Windows options / Windows Title
OpenWindow(0, 0, 0,gDesignClientWidth(?gadgets) ,gDesignClientHeight(?gadgets), #PB_Window_MinimizeGadget|#PB_Window_ScreenCentered, "Template gDesign")
CreateGadgetList(WindowID())
gDesign(?gadgets,@ItemIndex(),0,0)

;/ N° of Gadget is given by ToolTip
Repeat
  Event=WaitWindowEvent()
  
  If Event = #PB_EventGadget
    Debug EventGadgetID()
  EndIf
Until Event=#PB_Event_CloseWindow

DataSection
gadgets: IncludeBinary "new.gdf"
EndDataSection
User avatar
Mischa
Enthusiast
Enthusiast
Posts: 115
Joined: Fri Aug 15, 2003 7:43 pm

Post by Mischa »

@Droopy

You don't need the gDesignMaxItem function for creating gDesign,
if you KNOW the Result before. = Highest ItemNumber.

You should make the initcall in beginning of gDesign() function.

Regards
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

@Droopy
When you use my original-version, there is no call required of Init.
The Name of Lib must: gDesign
The automatic Initfunction must: gDesign_Init()
Initfunction without Parameters and without ProcedureReturn. It was called automatic bei using the lib

TailBite create descfile like this:
gDesign_Init ()
InitFunction | StdCall
;
gDesignClientWidth, Long (*gdata)
Long | StdCall
;
gDesignClientHeight, Long (*gdata)
Long | StdCall
;
gDesignMaxItem, Long (*gdata)
Long | StdCall
;
gDesign, Long, Long, Long, Long (*gdata, *gitems, goffx, goffy)
None | StdCall
;
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Droopy
Enthusiast
Enthusiast
Posts: 658
Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:

Post by Droopy »

I agree and Add init function ( the lib of Ts-soft ) :wink:
User avatar
Droopy
Enthusiast
Enthusiast
Posts: 658
Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:

Post by Droopy »

Add gDesign to the New menu (aka ShellNew entries) ?

http://windowsxp.mvps.org/shellnewadd.htm
Intrigued
Enthusiast
Enthusiast
Posts: 501
Joined: Thu Jun 02, 2005 3:55 am
Location: U.S.A.

Post by Intrigued »

Very compact, easy to use... from the couple minutes I have used it.

*thumbs up*
Intrigued - Registered PureBasic, lifetime updates user
User avatar
Droopy
Enthusiast
Enthusiast
Posts: 658
Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:

Post by Droopy »

It is possible reorder gadget number.
When i use Tab to navigate thru gadgets, the order is done by gadget order of creation.
xgp
Enthusiast
Enthusiast
Posts: 128
Joined: Mon Jun 13, 2005 6:03 pm

Post by xgp »

Really nice;)

xgp
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

This will be quite handy.

Many thanks.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Very nice. Its great when projects like this are created =)
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

Am I stupid or the gadgets moves when you click on them? I just loaded the included gui examples, clicked on a button and it moved to the left a little (and couldnt move it back to the original pos)

I believe it's the grid causing this (you designed the gui with a smaller grid for example, since the default grid is bigger / different sized, odd things might happen) you should store the grid settings on each gui file, are you doing it already?

cheers.
(I wouldnt switch the official editor for this one, however if you add a couple of more features I might).

also, set the window to foreground every time you reset its contents (for example new design, will "reset" the program, it might not come back to the top - the window -, so make sure..)

So far its kicking certain paid designer because of certain feature I requested for certain paid designer which was never added ehem.. jrk..
! Black holes are where God divided by zero !
My little blog!
(Not for the faint hearted!)
User avatar
Droopy
Enthusiast
Enthusiast
Posts: 658
Joined: Thu Sep 16, 2004 9:50 pm
Location: France
Contact:

Post by Droopy »

You can move gadget with arrow key, can you add autorepeat function for keys ?
User avatar
Mischa
Enthusiast
Enthusiast
Posts: 115
Joined: Fri Aug 15, 2003 7:43 pm

Post by Mischa »

Ok, i will work a few days more on gDesign.
First changes made. Update the next days.
But i will change the licence from freeware
to donationware, ok?

And now...let me work.

Regards,
Mischa
User avatar
Mischa
Enthusiast
Enthusiast
Posts: 115
Joined: Fri Aug 15, 2003 7:43 pm

Post by Mischa »

Hi!

In a few days more, i will release beta 2.
For those, which can't await i will give an first impression.

Image

Regards,
Mischa
Post Reply