On Mon, Apr 1, 2013 at 12:20 PM, Haroldo Stenger <[email protected]>wrote:
which leads me to the question of: how to get the w? > More deeply, I'm trying hard to understand why c.frame.top.leo_ui.setStyleSheet(p.b) > works, and I can't realize myself. > Excellent questions. You should never have to use c.frame.top.leo_ui. That's an internal ivar. Instead, scripts should use c.frame.body.bodyCtrl, as described (not very well!) at http://leoeditor.com/scripting.html#c-frame-body-bodyctrl What's "really" going on is that there are "official" ivars that all scripts should. Geeze, it looks like they aren't described explicitly. That's a huge hole in the docs! Here are the most important, starting from the "root":: c: The commander of the present outline (.leo file) c.frame: the leoFrame object for the entire main window. c.frame.body: the leoBody object for the body pane. c.frame.log: the leoLog object for the log pane. c.frame.tree: the leoTree object for the tree pane. **Important**: c.frame, c.frame.body, c.frame.log and c.frame.tree are *not* the underlying Qt widgets. They are wrapper classes that implement a gui-independent interface used by Leo's core. The actual Qt widgets are:: c.frame.body.bodyCtrl c.frame.log.logCtrl c.frame.tree.treeCtrl All the above ivars are **official ivars**, meaning that: 1. Their names and meanings will never change and 2. They are intended for use by scripts. Point 2 means that they are the highest-level possible ivars to get the job done. Of course, the xCtrl ivars point to actual Qt widgets, so they aren't really high-level, but they are as high-level as possible ;-) HTH. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
