Re: Re: cfg.h (config layer 0 discussion)
D Richard Felker III <[email protected]>
| Newsgroups | gmane.comp.video.mplayer.g2.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, May 19, 2003 at 03:36:34PM +0300, Andriy N. Gritsenko wrote:
> Hi, D Richard Felker III!
>
> Sometime (on Monday, May 19 at 15:09) I've received something...
> >On Mon, May 19, 2003 at 02:33:27PM +0300, Andriy N. Gritsenko wrote:
> >> Hi, Arpi!
> >>
> >> Sometime (on Monday, May 19 at 13:13) I've received something...
> >> >> config_group_info_t* optional subconfig (config_t*).
> >>
> >> >why???
> >> >forget subconfig
> >>
> >> I meant something like:
> >>
> >> config_t global_config[]={
> >> {"~File", NULL, CONF_TYPE_GROUP, 0, 0, 0, file_config, NULL},
> >> {"~Video", NULL, CONF_TYPE_GROUP, 0, 0, 0, video_config, NULL},
> >> {"~Audio", NULL, CONF_TYPE_GROUP, 0, 0, 0, audio_config, NULL},
> >> {NULL, NULL, 0, 0, 0, 0, NULL, NULL}
> >> }
> >>
> >> then we could add optional items (to video_config[] for example) by GUI
> >> not in common config but in any. :)
>
> >Huh? I don't see why this is useful. Could you explain better?
>
> I'll try to explain. How menu system for GUI-based application may be
> created? By another structure that will copy config but with some tree?
> You may be very surprised but level 0 config already has all for GUI menu
> in it. Only thing it has not yet was formatting field (from main menu
> panel to drop-down menu, from drop-down menu to submenu, for separators
> between parts of drop-down menu, etc.). So that CONF_TYPE_GROUP at first
> was proposed as such formatting field (application-level type config
> item). Finally on "Alt" keypress or mouse event we can just run some
> function of GUI like display_menu(window,config) - it's enough and you
> don't have to make some deep changes to reformat menu - just reorder
> items of config in source or even in runtime. :)
> Did you understand now?
Hmm, so the point is to make it easy to nest groups (as subconfigs)
and add and remove items from them?
Rich