Intention to commit a major change.


Subject: Intention to commit a major change.
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Tue Jan 29 2002 - 00:58:45 CST


Hi everyone,
            I've finished my code to fix bug 158 (show an hour glass
during long operations) and to allow abiword to be used while loading
documents. Now the load procedure is:

1. Document is loaded into the piecetable -> abiword says "importing
document and shows a blank screen and a "watch" cursor on the current
screen)

2. The layout classes are filled. Abiword says "loading document" in the
status screen, shows the first page(s), updates the number of pages loaded
and shrinks the scroll bar appropriately and shows the "watch" cursor
(like you get when loading a document in a browser).

Notes that you type and edit in a another frame while the document is
loading in the first frame and abiword no longer freezes.

HOWEVER although I'm confident this all works nicely for unix, there will
need to be work on the behalf of other platform maintainers to get this to
work for their platforms.

In particular other platfroms will need to implement
xap_Frame::nullUpdate()

This is just a void function in windows right now. On unix it does

        UT_uint32 i =0;
        while(gtk_events_pending() && (i < 5))
        {
                gtk_main_iteration ();
                i++;
        }
 Which processes events in the gtk event loop. Dom says this is easy to
implement on windows too.

Is this something David Mendlelin could look at?

Also you'll need to implement the GR_CURSOR_WAIT enum for your platform.

Also you'll need to implement xap_*Frame.cpp::setCursor()

Right now I've just set this to void function on all but unix. What it dos
is just the cursor to whatever you want on all places on frame other than
the document window.

The code for unix was just cur and pasted from
gr_UnixGraphics::setCursor(...) with this extra bit.

        gdk_window_set_cursor(getTopLevelWindow()->window, cursor);
        gdk_window_set_cursor(getVBoxWidget()->window, cursor);
        gdk_window_set_cursor(m_wSunkenBox->window, cursor);
        gdk_window_set_cursor(m_wStatusBar->window, cursor);

To cover everything not in the document window.

In ap_*Frame.cpp I had to seperate out cloneFrame and split it into

XAP_Frame * AP_UnixFrame::cloneFrame()

and

XAP_Frame * AP_UnixFrame::buildFrame(XAP_Frame * pF)

This was a matter of cutting and pasting code. I've done this for all
platforms. This code should really be in src/wp/ap/xp/ap_Frame.cpp but we
don't have a frame class in the wxp layer of src/wp/ap so I made all the
changes for each of the platforms.

If it doesn't work, sorry, please let me know if you can't fix it.

What else?

the code in src/wp/ap/unix/ap_UnixFrame.cpp::_showDocument was changed a
bit. Now the process of creating an fl_DocLayout class is seperate from
the process of filling it.

This is done with the method

FL_DocLayout::fillLayouts().

I implemented this for all the platforms in ap_*Frame.cpp::_showDocument
via the the line

pDocLayout->fillLayouts()

However this has only been tested on unix and gnome. Sorry if I broke
something on the other platforms. Please ask if you can't fix it.

Finally to correctly implement our cool zoom to frame size (width and
page) options I found a had to implement a gtk_idle_call to call some new
methods in xap_Frame.cpp

These are methods to implement a background updater. This is all xp code
(the background updater that is) but the to invoke it you'll need to
implement some hooks to whatever your platform uses to to catch resize
events.

In xap_*FRame you'll need to invoke

/*!
 * This starts the auto Updater for the view
 */
void XAP_Frame::_startViewAutoUpdater(void)

Which will take care of updating the frame while zooming to a frame based
size.

OK Well that is a lot of talk, why don't I just commit? Because CVS is
dead again and I had a bit of time to write this long message. As soon as
CVS is revived by someone I'll commit this.

Cheers!

Martin



This archive was generated by hypermail 2b25 : Wed Jan 30 2002 - 09:13:56 CST