wxGlade suggestions

Hi,

Is it possible to add these functions to the wxGlade ?

1. create custom controls:

- the user should be able to select any available control and add it to
the project's resources - wxGlade should generate a custom class that
inherits from the original control; user shouldn't be able to change the
super class after creation
- if the super class is a container, the user should be able to add
other controls/sizers to it, like when using that control on a normal
wxForm
- user should be able to define events for this custom control

2. add custom controls form the current project:

- wxGlade could have a toolbox where custom controls are added and
deleted automatically when they are added and deleted from the project
- when you create a new frame/custom control, user should be able to add
standard controls or already existing controls.
- wxGlade should forbid circular dependencies (control A contains
control B that contain control C that contains control A, for example),
by not letting the user to add a control that would create such a
dependency
- if wxGlade can't create the custom class, it should put some hatch box
with a label indicating the custom control at the place where the custom
control will go.

I think custom classes could be created by creating a frame and putting
in it the super class, but, when generating the code, generate it only
for the custom class.

The normal Glade doesn't have this, but wxGlade would be much better
this way :slight_smile:

Cheers,

Ionutz

(I think this is OT here, f.up on the wxGlade ml)

Hi,

Is it possible to add these functions to the wxGlade ?

1. create custom controls:

- the user should be able to select any available control and add it to
the project's resources - wxGlade should generate a custom class that
inherits from the original control; user shouldn't be able to change the
super class after creation
- if the super class is a container, the user should be able to add
other controls/sizers to it, like when using that control on a normal
wxForm

There's already something like that, if I understand correctly what you
mean: you can change the "class" property of the standard widgets to
create custom controls based on them (for the details and a better
explaination, have a look at the tutorial). If this is not what you meant,
please explain it again.

- user should be able to define events for this custom control

This has been discussed recently, and not solved yet, although I'm not
100% convinced that it's a good idea (and if it is, it's still not clear
to me what the best way of supporting events is)

2. add custom controls form the current project:

- wxGlade could have a toolbox where custom controls are added and
deleted automatically when they are added and deleted from the project -
when you create a new frame/custom control, user should be able to add
standard controls or already existing controls. - wxGlade should forbid
circular dependencies (control A contains control B that contain control
C that contains control A, for example), by not letting the user to add
a control that would create such a dependency
- if wxGlade can't create the custom class, it should put some hatch box
with a label indicating the custom control at the place where the custom
control will go.

I think custom classes could be created by creating a frame and putting
in it the super class, but, when generating the code, generate it only
for the custom class.

Again, I'm not sure I understand exactly, however this seems more an IDE
feature, requiring some introspection techniques: in this case, it's very
unlikely to be added (by me, at least :wink:

OTOH, it's possible to add new widgets "by hand", i.e. to define new
widget modules to be added to the "palette": this is still undocumented,
but we're trying to solve the issue.

The normal Glade doesn't have this, but wxGlade would be much better
this way :slight_smile:

Cheers,

Ionutz

Cheers,
Alberto

Hi,

(I think this is OT here, f.up on the wxGlade ml)

> Is it possible to add these functions to the wxGlade ?
>
> 1. create custom controls:
>
> - the user should be able to select any available control and add it to
> the project's resources - wxGlade should generate a custom class that
> inherits from the original control; user shouldn't be able to change the
> super class after creation
> - if the super class is a container, the user should be able to add
> other controls/sizers to it, like when using that control on a normal
> wxForm

There's already something like that, if I understand correctly what you
mean: you can change the "class" property of the standard widgets to
create custom controls based on them (for the details and a better
explaination, have a look at the tutorial). If this is not what you meant,
please explain it again.

Yep, it looks like what I've requested is almost there. I never try to
change that class property and look in the code: shame on me.

However, there is a small problem: The custom control is shown in the
hierarchy of a frame.

It would be nicer to be able to have the custom controls as children of
the application, the frame or even at the same level as the application
(maybe you should be able to also build frames at the same level with
the application, too, but I guess this is not very useful).

Another thing I think is missing is a property where to specify a file
where to put the class generated by wxGlade. The code generated by
wxGlade should then import the necessary files in the application/forms
files.

What I was proposing was to be able to create custom controls outside a
form (probably using internally, in wxGlade, a frame with the custom
control in it, but generate only the code for the custom control).

> 2. add custom controls form the current project:
>
> - wxGlade could have a toolbox where custom controls are added and
> deleted automatically when they are added and deleted from the project -
> when you create a new frame/custom control, user should be able to add
> standard controls or already existing controls. - wxGlade should forbid
> circular dependencies (control A contains control B that contain control
> C that contains control A, for example), by not letting the user to add
> a control that would create such a dependency
> - if wxGlade can't create the custom class, it should put some hatch box
> with a label indicating the custom control at the place where the custom
> control will go.
>
> I think custom classes could be created by creating a frame and putting
> in it the super class, but, when generating the code, generate it only
> for the custom class.

Again, I'm not sure I understand exactly, however this seems more an IDE
feature, requiring some introspection techniques: in this case, it's very
unlikely to be added (by me, at least :wink:

The "Add a custom widget" will suffice for now, for me :slight_smile:

Cheers,
Alberto

Cheers,
Ionutz

ยทยทยท

On Sat, 2003-06-14 at 00:47, Alberto Griggio wrote: