From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!Hx95GBhnJb0Xc8StPhH8AA.user.46.165.242.91.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: GtkAda callback and event Date: Fri, 10 Sep 2021 22:58:06 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <6133e791$0$6461$426a74cc@news.free.fr> <6134cb26$0$3697$426a74cc@news.free.fr> <6134db32$0$6461$426a74cc@news.free.fr> <6134dc71$0$3693$426a74cc@news.free.fr> <6134e03d$0$3372$426a74cc@news.free.fr> <61352d42$0$3749$426a74cc@news.free.fr> <944e2cf6-2e24-480e-b7f7-0e0e0f5082e7n@googlegroups.com> <6139be6f$0$12704$426a74cc@news.free.fr> <757da468-7b58-43c2-95e6-917b3212f7b2n@googlegroups.com> <613bc32d$0$27421$426a74cc@news.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: gioia.aioe.org; logging-data="767"; posting-host="Hx95GBhnJb0Xc8StPhH8AA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:62695 List-Id: On 2021-09-10 22:42, DrPi wrote: > I didn't think I can extend the widget type to add my own parameters. Not only for parameters. Even more frequent purpose is a composite widget. E.g. consider a text edit widget with a scroll bar, a menu, some buttons etc. Typically, you would take some existing widget and derive your widget from there. In the Initialize you will create all other widgets and pack them into the widget (if it is a container) or Ref them otherwise. In Gtk_New you will have custom parameters. This new widget you could use just as any built-in widget. Moreover, you can create a new class for your derived widget and add new events, properties and styles for external parametrization etc. The styles can be set via CSS. It is a very powerful and versatile mechanism GtkAda offers. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de