From: Vitaly Ostanin <vyt@vzljot.ru> To: ALT Devel discussion list <devel@altlinux.ru> Subject: [devel] Re: gtk2/pygtk2 programming mailing lists ? Date: Wed, 31 Mar 2004 12:49:58 +0400 Message-ID: <406A8636.3010006@vzljot.ru> (raw) In-Reply-To: <4069E075.9030903@l14.ru> [-- Attachment #1: Type: text/plain, Size: 1931 bytes --] Alexey Lubimov пишет: > Vitaly Ostanin пишет: >> >> И я не нашёл ни одного внятного примера, как в своём CellRenderer >> передавать на on_render позицию в дереве (или собственные данные). >> Всё, что нарыл - касается либо отрисовки статичного текста, либо >> checkbox'ов. > > данные находятся в соответствующем gtkliststore или treestore. > не совсем понятно, зачем специально передавать их в метод. Здесь http://www.moeraki.com/pygtkreference/pygtk2reference/class-gtkcellrenderer.html#method-gtkcellrenderer--render описаны параметры on_render: def render(window, widget, background_area, cell_area, expose_area, flags) Как из них или свойств GenericCellRenderer получить соответствующий treestore (iter в этом treestore) ? Для сравнения: def activate(event, widget, path, background_area, cell_area, flags) здесь хоть путь есть, по которому можно определить место в модели. Зачем специально передавать данные в метод - в исходниках CellRendererText (pixbuf, toggle) текст для отрисовки передаётся свойством при инициализации объекта CellRenderer. В GenericCellRenderer подобного свойства нет, и неясно, как его создать и заставить модель передавать в него что-либо. >> Здесь (в конце страницы) >> http://www.moeraki.com/pygtkreference/pygtk2reference/class-gtkcellrendererpixbuf.html >> >> упоминается, что можно привязать к определённому атрибуту своего >> CellRenderer значения из модели. А вот как создавать свои атрибуты, и >> как делать эти привязки - пока непонятно. > > Я немного другую проблему пытаюсь решить. Как добавить готовый > customCellRenderer, писанный на С. Может, пригодится http://laguna.fmedic.unam.mx/~daniel/pygtutorial/pygtutorial/x324.html После копания в архивах рассылки по pygtk2 у меня сложилось впечатление, что написать свой виджет на C и использовать в pygtk2 проще, чем написать его на pygtk2. <skipped/> -- Regards, Vyt mailto: vyt@vzljot.ru JID: vyt@vzljot.ru [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 252 bytes --]
next prev parent reply other threads:[~2004-03-31 8:49 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-03-30 7:52 [devel] " Vitaly Ostanin 2004-03-30 7:54 ` Sergey Pinaev 2004-03-30 7:58 ` Alexey Morozov 2004-03-30 8:00 ` Sergey Pinaev 2004-03-30 8:09 ` [devel] " Vitaly Ostanin 2004-03-30 15:05 ` Алексей Любимов 2004-03-30 15:44 ` Vitaly Ostanin 2004-03-30 15:51 ` Sergey Pinaev 2004-03-30 15:59 ` Vitaly Ostanin 2004-03-30 16:07 ` Sergey Pinaev 2004-03-30 16:11 ` Vitaly Ostanin 2004-03-30 16:14 ` Alexander Bokovoy 2004-04-05 8:46 ` Vitaly Ostanin 2004-04-05 9:31 ` Sergey Pinaev 2004-04-05 10:44 ` Vitaly Ostanin 2004-03-30 21:02 ` Alexey Lubimov 2004-03-31 8:49 ` Vitaly Ostanin [this message] 2004-03-31 8:55 ` Vitaly Ostanin 2004-04-01 14:23 ` [devel] Re: GtkTreeView (was: gtk2/pygtk2 programming mailing lists ?) Vitaly Ostanin 2004-04-06 11:38 ` [devel] Re: gtk2/pygtk2 programming mailing lists ? Vitaly Ostanin 2004-03-31 8:19 ` Denis Ovsienko 2004-03-30 11:24 ` [devel] " Anton Farygin 2004-03-30 12:41 ` [devel] " Vitaly Ostanin 2004-03-30 13:22 ` Anton Farygin 2004-03-30 13:28 ` Aleksey Novodvorsky
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=406A8636.3010006@vzljot.ru \ --to=vyt@vzljot.ru \ --cc=devel@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git