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=-2.9 required=3.0 tests=BAYES_00,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed2-a.proxad.net!nnrp1-1.free.fr!not-for-mail Newsgroups: comp.lang.ada 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> From: DrPi <314@drpi.fr> Subject: Re: GtkAda callback and event Date: Sat, 11 Sep 2021 17:24:41 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Message-ID: <613cca39$0$29491$426a34cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 11 Sep 2021 17:24:41 CEST NNTP-Posting-Host: 82.65.30.55 X-Trace: 1631373881 news-4.free.fr 29491 82.65.30.55:51627 X-Complaints-To: abuse@proxad.net Xref: reader02.eternal-september.org comp.lang.ada:62708 List-Id: Le 10/09/2021 à 22:58, Dmitry A. Kazakov a écrit : > 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. I already do this. I don't know why I didn't think to apply this to my own parameters. > > 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. Interesting. Any pointer on how to use CSS styles ? > > It is a very powerful and versatile mechanism GtkAda offers. > Even if I just started using GtkAda, I find it very powerful. The big problem is documentation. Of course, there are the reference manual and the (small) user guide but I miss a document explaining the use of all these functionalities. I found a tutorial in French which is very helpful for starting but it is outdated.