PDA

View Full Version : Plugin Examples incl. DUI example



Ron
April 1st, 2005, 01:10 PM
THIS IS OLD INFORMATION - GIRDER 5


Hi Guys,

It was high time for a couple of examples on how to use the DUI stuff for real.

There are 2 examples, the first one is the sendmessage plugin, it is a very basic easy to understand plugin.

The second example is a full blown example on the DUI. Comments and suggestions are very welcome.

You'll need beta 8+ to run these.

birty
April 1st, 2005, 02:21 PM
would it be useful if i stripped down my media player plugin into a basic example of using the dui in delphi?

Ron
April 1st, 2005, 02:27 PM
Sure if you feel like doing that. :D

Mark F
April 1st, 2005, 03:38 PM
Could you enumerate the fields and field types for the LUA objects that represent the different widgets?

Examples from the code:
For an edit box the fields are: .Text (string) and .Enabled (bool)
For a check box the fields are: .Caption (string), .Enabled (bool) and .Checked (bool)

Ron
April 1st, 2005, 03:40 PM
After releasing the alpha I just jumped on my bike and drove a couple of miles, darn I am out of shape after not biking into campus anymore. :-)

Anyway with my foggy head I'd say look at the manual, i've listed all the fields there. Is that what you mean or do you mean doing this in code?

birty
April 1st, 2005, 04:08 PM
heres the delphi dui example, enjoy

Mark F
April 1st, 2005, 04:14 PM
Manual? Doh! It's in the help file, of course. Nevermind. :oops:

Ron
April 1st, 2005, 04:19 PM
Yeah that page with title 'Regular Expressions' heading. Pfff I can't believe I missed that one. Anyway I can see how you didn't think of looking at the manual, since G3.3 really didn't have any. Would you believe that we are actually having a professional doing the manual! :-) The one that is included is the one I started doing, the real thing is under development and should be ready come release time.

Ron
April 15th, 2005, 06:57 PM
A little tip.

If your plugin has a lot of action that all go into a new group of your own simply 'hook' that group instead of all the separate action pages!

denmike
July 3rd, 2005, 03:50 PM
heres the delphi dui example, enjoy

Hi I'm trying to get this DUI stuff to work with Delphi, so thanks for your example.

However a bunch of included files are missing, and I was wondering if you could tell me where I can find them. Especially lua and lauxlib which I guess are lua type and function definitions? But also GShared and GCore - I guess those are girder type and function definitions?

If these files are publicly available I'd really appreciate a pointer to where I can find them :-)

//michael

Promixis
July 3rd, 2005, 04:00 PM
The lua files are available from lua.org.

birty
July 3rd, 2005, 04:07 PM
the files are installed with girder under Girder4\includes , make sure you checked install developer files when you installed girder, you will also need to add the path to delphi's search path

denmike
July 3rd, 2005, 05:20 PM
the files are installed with girder under Girder4\includes , make sure you checked install developer files when you installed girder, you will also need to add the path to delphi's search path

Ok, got the .h files - that's a nice start. Just a dumb question: Is it possible to import those directly into Delphi, or should I convert them to .pas files? I'm still using d4, so I assume the last, but if newer versions can do it automatically, then maybe it's time to upgrade :wink:

//michael

birty
July 3rd, 2005, 05:58 PM
the pascal files should also be in the same directory (unless ron has accidentally left them out of the latest version?)

denmike
July 3rd, 2005, 06:11 PM
the pascal files should also be in the same directory (unless ron has accidentally left them out of the latest version?)
Apparently he did - I don't see them here with a full install...

//michael

birty
July 4th, 2005, 05:29 AM
Here are the delphi includes:

mhwlng
July 23rd, 2005, 10:11 AM
I'm building a plugin with a dui action page with master/detail comboboxes (o, joy)

I add the string list with the items separated by \r

ControlSetString(L, "ComboBox1", "Strings", remotelist);

when I read them back,

ControlGetString(L, "ComboBox1", "Strings", Strings1);

I get my items back separated by \r\n

I handle this properly in my code now, but is this :
a) by design
b) a bug
c) I need to read the documentation more carefully or go back to c++ school

Marcel

esajesa
August 13th, 2005, 04:44 PM
Birty,

there's no attachment to your post... Perhaps you could reattach the delphi includes??

Ron, would it be possible to get all this included in the next release??

Cheers,
Jens

birty
August 13th, 2005, 07:29 PM
i removed them as ron said that he didnt really want their contents generally available, i think that the revised includes are complete ron just probably forgot to include them in the setup

Rob H
August 14th, 2005, 08:52 AM
Is it possible to use the DUI to provide a configuration page for a Lua script e.g. LDJ? Rather than having the user edit a Lua file it would be nice to be able to configure things using the DUI.

birty
August 14th, 2005, 09:14 AM
i think ron said that it would be added (/may have already been added) to the treescript plugin

Ron
August 14th, 2005, 12:12 PM
This has not been added yet. I'll see how much work this is and decide if we can do it for the 4.0 release.

Rob H
August 14th, 2005, 02:53 PM
And what about the Delphi header files?

Ron
August 14th, 2005, 04:30 PM
Sorry I know I've been draggin my feet on this one. It's not a fun job maintaining my headers, the headers for the dev kit and the C headers.

m1duckett
September 24th, 2005, 03:02 AM
First: Excellent excellent product and manual!

I was able to convert my plugin over to the DUI in a matter of hours and I was able to remove the Win32 GUI code :D from the plugin.

Couple comments:

Why is TCommand.Action.iValue[1..3] and TCommand.Action.bValue[1..3] a PCHAR data type? Can they not be ints and bools?

I am not sure I get a feel for how the designed form will show up in the panel without a bit of trial and error. Are there visual cues in the designer I am missing?

Second, the DUI provides much much power and flexibility. Are you planning on defining any best practices in implementing plugin forms? For example, should the plugin add its own group or stick actions in another group? Should one create one action with edits or create multiple actions but no edits.

Is there a way to rename a command on the GML tree from within the action form? Versus selecting "rename" on the tree?

How do you get the Logger to log the plugin messages? :) The logger tab has a finite list of devices to log from.

Finally, will you be adding data structure details to the manual (i.e. TCommand, TAction, etc...) The header file is pretty intuitive, but docs are nice to describe any nuances.

-Mike

Ron
September 24th, 2005, 12:36 PM
> First: Excellent excellent product and manual!

Thanks.

> I was able to convert my plugin over to the DUI in a matter of hours and I was able to remove the Win32 GUI code from the plugin.

Great!!

> Couple comments:

> Why is TCommand.Action.iValue[1..3] and TCommand.Action.bValue[1..3] a PCHAR data type? Can they not be ints and bools?


In Girder 3 these were actually bools and integers. However this had the limitation that none of these fields could hold
variables names where sometimes you would like to put in variables. Thus in Girder 4 we kept the field names but switched them
to PCHARS so we can have variables anywhere.


> I am not sure I get a feel for how the designed form will show up in the panel without a bit of trial and error. Are there visual cues in the designer I am missing?


It should look pretty much the same expect for some of the composite controls which are represented as a button due to some issues
with dragging composite controls.


> Second, the DUI provides much much power and flexibility. Are you planning on defining any best practices in implementing plugin forms? For example, should the plugin add its own group or stick actions in another group? Should one create one action with edits or create multiple actions but no edits.


Yes we are. There is a Misc. group for random actions, if you exports a couple of actions then put them into their own group.
If your action fits into one of the predefined groups then by all means place them there.

> Is there a way to rename a command on the GML tree from within the action form? Versus selecting "rename" on the tree?


No, personally I think the plugin should not be able to do this.


> How do you get the Logger to log the plugin messages? The logger tab has a finite list of devices to log from.


GirderLogMessageEx( <PCHAR PLUGINNAME>, <PCHAR MESSAGE>, <int ICON>);

GirderLogMessageEx( PLUGINNAME, "Something great happened here", GLM_GOOD_ICON);

> Finally, will you be adding data structure details to the manual (i.e. TCommand, TAction, etc...) The header file is pretty intuitive, but docs are nice to describe any nuances.

I am sure we will :-)

m1duckett
September 24th, 2005, 02:00 PM
> How do you get the Logger to log the plugin messages? The logger tab has a finite list of devices to log from.


GirderLogMessageEx( <PCHAR PLUGINNAME>, <PCHAR MESSAGE>, <int ICON>);

GirderLogMessageEx( PLUGINNAME, "Something great happened here", GLM_GOOD_ICON);


Yep, I got that in the code... trouble is I do not see the logger messages in the output window. I thought maybe the logger plugin setup tab needed my plugin to show up in the list of things to log, but it doesn't. So I am confused as to why the log messages are not showing up.

Ron
September 24th, 2005, 02:39 PM
That is very weird they should show up. Send me your plugin, so I can run it here.

Ron
November 9th, 2005, 02:55 PM
updated examples to use new DUI system.

dj212
November 17th, 2005, 01:38 AM
very nice...vb/dephi stuff

birty
November 17th, 2005, 05:20 AM
there is a delphi dui example there, its out of date but should still give you the basics. if you want a more complex example then you could download my media player plugin which includes the source code

onurusa
September 17th, 2007, 07:51 PM
How u guys making these plugins which programs r u using if u have any examples with codes i will be very helpful


Hi Guys,

It was high time for a couple of examples on how to use the DUI stuff for real.

There are 2 examples, the first one is the sendmessage plugin, it is a very basic easy to understand plugin.

The second example is a full blown example on the DUI. Comments and suggestions are very welcome.

You'll need beta 8+ to run these.

liofr
February 19th, 2008, 04:17 PM
remove question about dui when read information on Girder help file
thank's

harleydude
November 20th, 2008, 08:25 PM
What, if any, limitations with using Visual Studio 2005 C++ Express to create Girder plugins?

harleydude
November 26th, 2008, 11:18 PM
Using VC++ 2005, I have been able to compile and load a plugin into Girder. However when I send that dll to John, does not show in Settings->Plugins.

Any ideas?

Ron
November 26th, 2008, 11:26 PM
I bet it's missing runtime files for vs2005...

Rob H
November 27th, 2008, 03:46 AM
That does sound likely - try this URL for the 2005 SP1 version (http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&displaylang=en)

jwilson56
November 27th, 2008, 09:56 AM
Well I installed that and still don't see Rick's plugin

harleydude
November 27th, 2008, 10:11 AM
I have installed it on 2 other PC's and Girder sees it just fine. To my knowledge the runtimes were not installed by me.

Rob H
November 27th, 2008, 12:11 PM
Just as a sanity check where are you installing the plugin?

jwilson56
November 27th, 2008, 01:02 PM
/Girder/plugins with all the other plugins.

sudha88
October 11th, 2010, 07:02 AM
There are is an examples, the first one is the sendingmessage plugin, it is a very basic easy to understand plugin.

The second example is a full blown example on the DUI. Comments and suggestions are very welcome.
-------------------------------------