hi, Martin. thanks
I will implement the virtual methods Now. Yes, the virtual methods is called by the cross platform code. I have noticed that, because the cross platform design is similiar with what we do in a cross platform project in school. All the common method is abstracted by the cross platform code and implemented in the individual platform.
This mechanism make full use of virtual function, the concrete function will called finally.
And I noticed that the Observer Design Pattern is used in the source often.
Now I implement of that. Thanks
Chen Xiajian
发件人: Martin Sevior
发送时间: 2011-04-14 08:34:49
收件人: chenxiajian1985
抄送: abiword-dev
主题: Re: patch file_Implement progress bar in windows_chenxiajian
Hi Chen,
Thanks very much for this! Looking at your code, it appears that you
automatically hide the progress bar after it has reached either 50% or
100%.
Instead of that please implement the following virtual methods for
AP_Win32StatusBar.
virtual void showProgressBar(void) {}
virtual void hideProgressBar(void) {}
The implementation in the gtk build is really simple.
void AP_UnixStatusBar::showProgressBar(void)
{
gtk_widget_show(m_wProgressFrame);
}
void AP_UnixStatusBar::hideProgressBar(void)
{
gtk_widget_hide(m_wProgressFrame);
}
Where m_wProgressFrame is the container that holds the progress bar. I
imagine Win32 has similar functionality?
(I'm not a windows developer!)
The cross platform code will show and and hide the progress bars as
needed and has already been written.
Finally, we can indeed use these for other situations in abiword later :-)
Cheers
Martin
2011/4/14 chenxiajian1985 <chenxiajian1985@gmail.com>:
> Hi, all
> the attachment is the patch file that I implemant progress bar in windows. I have checked in my computer it works well.
> the image shows the progress bar in windows:
> http://hi.csdn.net/attachment/201104/13/65043_1302717024x1D4.png
>
> I care about some factors when coding:
> 1. when resize the status bar, the progress bar must resize too
> 2. the basic function
> 3. use the win32 common ctrls, the same as the source code
> 4. the position of the progress bar
> 5. the show and hide when operation finish
> ....
>
> Anyone who some suggestion, pls tell me. I will make the function more excellent.
>
>
> Thanks
> chen xiajian
Received on Thu Apr 14 03:43:49 2011
This archive was generated by hypermail 2.1.8 : Thu Apr 14 2011 - 03:43:49 CEST