Re: Speaking of the Style Dialog...


Subject: Re: Speaking of the Style Dialog...
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Tue Feb 06 2001 - 19:10:20 CST


On Tue, 6 Feb 2001, John L. Clark wrote:

> On Wed, Feb 07, 2001 at 10:59:33AM +1100, Martin Sevior wrote:
> >
> > The Numbered Headings is so easy I'll implement it once the Styles dialog
> > is in.
>
> I'll try to have it done as soon as possible. It's quite a trick to
> work around school and alternate responsibilities. But I'm reading
> through a lot of source code and trying to figure out how to implement
> it.
>
> Which brings me to my first real brain buster. The Style drop down menu
> currently displays the 6 default styles, which are hardwired into
> ap_UnixToolbar_StyleCombo.cpp, line 64. The first thing I have been
> trying to do is figure out a way to get the macroed-out code to work, in
> order to be able to display all styles. As it says, we need a reference
> to the document or view in order to be able to access the enumStyles
> method. However, the creation and management of the toolbar is dealt
> with through the *Toolbar classes, which don't seem to know anything
> about the PD_Document. Any thoughts on where I should look to figure
> out how to expose this information to the StyleCombo class?

Do:

PD_Document * pDoc =
getFrame()->getCurrentView()->getLayout()->getDocument();

Is there
> anything in the Document structure which knows about the toolbars and
> such?
>

No the document knows nothing about layout stuff except for page sizes.

> As I begin to develop the Styles dialog, where should I look for good
> example code? Is anyone else working on this? What sort of ETA should
> I shoot for?

I suggest you fire up glade, look at MS Word and copy their dialog. For
showing text in a drawing window look at the xap_Dlg_Preview class. You
may be able to reuse that class and or extend it for your purposes.

The ETA is two weeks..
> Thanks guys,
>

Feel free to keep us posted and ask for help!

Martin



This archive was generated by hypermail 2b25 : Tue Feb 06 2001 - 19:10:35 CST