[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re[4]: [paragui-users] script language for Paragui
From: |
Atani |
Subject: |
Re: Re[4]: [paragui-users] script language for Paragui |
Date: |
Fri, 19 Jul 2002 07:25:37 -0700 |
User-agent: |
KMail/1.4.2 |
I have looked at this and I think this would be able to generate something
that we can use easily. Here is an example of it parsing some of the PG
files:
bash-2.05a$ ctags -x pgmenubar.cpp
Add function 13 pgmenubar.cpp void PG_MenuBar::Add(const
char* text, PG_PopupMenu* menu, Uint16 indent, Uint16 width) {
Cleanup function 79 pgmenubar.cpp void PG_MenuBar::Cleanup() {
PARAGUI_CALLBACK function 57 pgmenubar.cpp
PARAGUI_CALLBACK(PG_MenuBar::handle_button) {
PG_MenuBar function 3 pgmenubar.cpp
PG_MenuBar::PG_MenuBar(PG_Widget* parent, const PG_Rect& rect, const char*
style) : PG_ThemeWidget(parent, rect, style) {
~PG_MenuBar function 9 pgmenubar.cpp PG_MenuBar::~PG_MenuBar() {
bash-2.05a$ ctags -x pgmenubar.h
ItemList member 81 pgmenubar.h std::vector<MenuBarItem*>
ItemList;
MenuBarItem typedef 79 pgmenubar.h } MenuBarItem;
PG_MENUBAR_H macro 30 pgmenubar.h #define PG_MENUBAR_H
PG_MenuBar class 45 pgmenubar.h class DECLSPEC PG_MenuBar :
public PG_ThemeWidget, public PG_EventObject {
button member 77 pgmenubar.h PG_Button* button; //!<
pointer to the PG_Button object showed in the bar
my_active member 95 pgmenubar.h PG_PopupMenu* my_active;
my_btnOffsetY member 83 pgmenubar.h Uint16 my_btnOffsetY;
my_style member 94 pgmenubar.h std::string my_style;
popupmenu member 78 pgmenubar.h PG_PopupMenu* popupmenu;
//!< pointer to the linked PG_PopupMenu object
Using this info (piped to a file and then read in) I think that parsing of
user data files will not be a problem...
This is just using the default options (with exception of -x which generates
user readable output) it looks pretty good...
Mike
On Friday 19 July 2002 00:09, Andrew Ford wrote:
> Hey,
> This is interesting: http://ctags.sourceforge.net/
> It seems to be able to parse C++ code for class
> definitions (among other things). Don't know how
> useful it would be, but...
>
> Andrew
>
> --- atani <address@hidden> wrote:
> > Perhaps its even easier than this...
> >
> > We can perhaps create an xml definition of the
> > widgets and require the
> > user to create this definition file to ensure
> > "proper" code insight,
> > etc of their custom widgets... And if they do not
> > have a definition
> > file we can resort to parsing the file...
> >
> > How does this sound?
> >
> > Mike
> >
> > > Okay, for Python:
> > > embedding instructions:
> > > http://www.python.org/doc/current/ext/ext.html
> > > - This is the extending API, but there's a
> >
> > section
> >
> > > on embedding
> > > swig interface compiler:
> > > http://www.swig.org/
> > > - This can generate Python interface code to
> >
> > export
> >
> > > C/C++ functions to a Python module. This is
> >
> > the
> >
> > > method paragui currently uses to export the
> >
> > API.
> >
> > > ...or...
> > > The boost Python lib:
> > > http://www.boost.org/libs/python/doc/
> > > - (Down right now) Says it can easily reflect
> > > classes back and forth between C++ and Python.
> > > I haven't used it.
> > >
> > > The problem with trying to parse a C++ header is
> >
> > that
> >
> > > it isn't at all easy. I don't even know how
> >
> > easily
> >
> > > you could do a limited parse looking for a single
> >
> > new
> >
> > > widget. Maybe if you asked the user to include
> >
> > some
> >
> > > sort of marker to delineate the stuff that the
> >
> > layout
> >
> > > manager should parse (this is how swig does things
> >
> > as
> >
> > > far as I know). The options are pretty
> >
> > interesting,
> >
> > > though.
> > >
> > > Andrew
> > >
> > > --- atani <address@hidden> wrote:
> > > > The same functionality of "user controls" can be
> > > > done via the same
> > > > method in which a "PG_*" class object is parsed.
> >
> > A
> >
> > > > user would tell the
> > > > RAD tool that they have a header file which
> >
> > defines
> >
> > > > a widget and the
> > > > tool would parse that header and generate
> >
> > controls
> >
> > > > for that header.
> > > > This can be done in any language.
> > > >
> > > > I am still interested in more info on the usage
> >
> > of
> >
> > > > Python embeded
> > > > within a C/C++ program however. I have not
> >
> > heard of
> >
> > > > this and it sounds
> > > > interesting. However, for this project I still
> > > > think picking the
> > > > native language of the GUI is best for the RAD
> >
> > tool.
> >
> > > > Mike
> > > >
> > > > > This conversation is specifically talking
> >
> > about
> >
> > > > the
> > > >
> > > > > RAD layout tool that atani is working on. I
> > > >
> > > > suggested
> > > >
> > > > > using Python, since you can access the members
> >
> > of
> >
> > > > the
> > > >
> > > > > class via the dictionary. Since you can do
> >
> > that,
> >
> > > > it
> > > >
> > > > > would let a user layout his own custom widgets
> > > >
> > > > that
> > > >
> > > > > he's made, and let the tool give the user
> >
> > access
> >
> > > > to
> > > >
> > > > > the custom fields and methods during layout.
> >
> > This
> >
> > > > is
> > > >
> > > > > like adding new components to the pallette of
> >
> > a
> >
> > > > RAD
> > > >
> > > > > tool. Using Python would also give access to
> >
> > the
> >
> > > > > interpreter, so that you could
> >
> > programmatically
> >
> > > > create
> > > >
> > > > > widgets during layout. Of course, I'm not the
> >
> > one
> >
> > > > > programming it, so what atani says will go
> >
> > with
> >
> > > > > regards to his layout tool.
> > > > >
> > > > > Andrew
> > > > >
> > > > > --- Robby Dermody <address@hidden>
> >
> > wrote:
> > > > > > Hey guys,
> > > > > >
> > > > > > Just my two cents on this.
> > > > > >
> > > > > > I integrated python into my project as the
> > > >
> > > > embedded
> > > >
> > > > > > scripting language and
> > > > > > wrote an extention module for it by hand
> >
> > (before
> >
> > > > I
> > > >
> > > > > > discovered SWIG, et al)..
> > > > > > I have only minimal experience coding under
> > > >
> > > > Python,
> > > >
> > > > > > but I will say that I am
> > > > > > impressed with both the embedding/extending
> >
> > C
> >
> > > > API
> > > >
> > > > > > and the language itself.
> > > > > > It would be my choice and I think that
> >
> > ParaGUI
> >
> > > > can
> > > >
> > > > > > do MUCH worse than to
> > > > > > pick Python.
> > > > > >
> > > > > > Robby
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: "taurus" <address@hidden>
> > > > > > To: "Andrew Ford"
> > > > > > <address@hidden>
> > > > > > Sent: Wednesday, July 17, 2002 4:20 PM
> > > > > > Subject: Re[4]: [paragui-users] script
> >
> > language
> >
> > > > for
> > > >
> > > > > > Paragui
> > > > > >
> > > > > > > Hello Andrew,
> > > > > > >
> > > > > > > Wednesday, July 17, 2002, 1:29:27 PM, you
> > > >
> > > > wrote:
> > > > > > > >> What about Tcl?
> > > > > > >
> > > > > > > AF> Anyway, you can also embed a Python
> > > > > >
> > > > > > interpreter into a
> > > > > >
> > > > > > > AF> C/C++ program no problem,
> > > > > > >
> > > > > > > This I didn`t know :)
> > > > > > > My experience with Python is 0 :P, but
> >
> > sounds
> >
> > > > > > interesting
> > > > > >
> > > > > > > What the other advantages?
> > > > > > >
> > > > > > >
> > > > > > > Kind regards,
> > > > > > > taurus
> > > > > > >
> > > > > > > address@hidden
> > > > > > >
> > > > > > > ->> "If you will have a megaphone, you
> >
> > will
> >
> > > > never
> > > >
> > > > > > have to be alone..."
> > > >
> > > > _______________________________________________
> > > >
> > > > > > > paragui-users mailing list
> > > > > > > address@hidden
>
> http://mail.freesoftware.fsf.org/mailman/listinfo/paragui-users
>
> > _______________________________________________
>
> === message truncated ===
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Autos - Get free new car price quotes
> http://autos.yahoo.com
>
> _______________________________________________
> paragui-users mailing list
> address@hidden
> http://mail.freesoftware.fsf.org/mailman/listinfo/paragui-users