<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Hello!<br>
    <br>
    <blockquote type="cite">
      <pre wrap="">Ah - so Window is misleading, that is a very low base class. You want
to inherit from eg. Dialog, or SystemWindow I suspect.</pre>
    </blockquote>
    1. I expect this window hasn't any system borders and menus (close,
    minimize and so on). I expect this window isn't a dialog and hasn't
    any menubar (SystemWindow has the menubar). I need draw on this
    window, set its position and get mouse input from it.<br>
    <br>
    <blockquote type="cite">
      <pre wrap="">Well; you sure it is white ? I had a hack at this in the past - I
attach my nasty patch to writer to make shockingly ugly looking
gradients in the background ;-) hopefully it shows you where to hack.
Having said that I think some of that code needs cleaning up really :-)</pre>
    </blockquote>
    2. I did the gradient background in a same way (in _PaintDesktop()
    function), like this: <br>
    <blockquote><tt>Color col_start(0xFF, 0x00, 0x00), col_end(0x00,
        0x00, 0xFF); <br>
        Size sz = pWin-&gt;GetSizePixel(); // we get size of window
        containing a document [in pixels]<br>
        Rectangle rect(0, 0, sz.Widht(), sz.Height());<br>
        rect = GetOut()-&gt;PixelToLogic(rect); // convert rect of
        window to logic space<br>
        ...<br>
        float alpha1 = float(aRectangle.Top() - rect.Top()) /
        float(rect.Height());<br>
        float alpha2 = float(aRectangle.Bottom() - rect.Top()) /
        float(rect.Height());<br>
        Color c1 = (1 - alpha1)*col_start + (alpha1) *col_end; // this
        is math formula, but it is not difficult to implement in C++ <br>
        Color c2 = (1 - alpha2)*col_start + (alpha2) *col_end; // this
        is math formula, but it is not difficult to implement in C++ <br>
        GetOut()-&gt;DrawGradient(aRectangle,
        Gradient(GradientStyle_LINEAR, c1, c2));</tt><br>
    </blockquote>
    But this solution has probably two problems. First, during scrolling
    the borders of page doesn't redraw correctly (this artifact cannot
    be seen in case of old background with one simple color). Second,
    the space between pages doesn't redraw during scrolling. <br>
    Your variant has the same problem.<br>
    <br>
    <br>
    26.04.2011 17:09, Michael Meeks пишет:
    <blockquote cite="mid:1303823344.3388.34.camel@lenovo-w500"
      type="cite">
      <pre wrap="">Hi there !

On Tue, 2011-04-26 at 12:25 +0400, Георгий Сапронов wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Rafael Cabral from Mandriva recommended you as professional in
OpenOffice developing.
</pre>
      </blockquote>
      <pre wrap="">
        Good man :-) but really the best thing is to CC the public development
list: don't be afraid - we're quite friendly.

        <a class="moz-txt-link-abbreviated" href="mailto:libreoffice@lists.freedesktop.org">libreoffice@lists.freedesktop.org</a>

        please CC your replies to this there :-) it is much quicker and you get
replies when I'm on holiday / busy etc.

</pre>
      <blockquote type="cite">
        <pre wrap="">I and Dmitry Ashkadov (in CC) making changes in OpenOffice. But we get
in trouble. We'll be glad if you could help us a little :)
</pre>
      </blockquote>
      <pre wrap="">
        We love changes :-)

</pre>
      <blockquote type="cite">
        <pre wrap="">1. Can we create graphical element (I mean to implement class inherit
from Window class VCL module) so this element can float on top of its
parent. What methods we should override and how add it so it can
receive mouse events?
</pre>
      </blockquote>
      <pre wrap="">
        Ah - so Window is misleading, that is a very low base class. You want
to inherit from eg. Dialog, or SystemWindow I suspect.

</pre>
      <blockquote type="cite">
        <pre wrap="">2. In the SwEditWin class we have override Paint() function in which
we want to draw a background.
</pre>
      </blockquote>
      <pre wrap="">
        Oooh - fun :-)

</pre>
      <blockquote type="cite">
        <pre wrap=""> The ViewShell class has _PaintDesktop() function where background
draw partly. If we comment _PaintDesktop function to prevent
background drawing  we'll receive white background. And if we draw
something in SwEditWin::Paint() we have the same white background. If
we comment in SwEditWin::Paint() line pWrtShell-&gt;Paint(...) background
will not paint in white. So we can't understand where occurs white
paint. What do you think?
</pre>
      </blockquote>
      <pre wrap="">
        Well; you sure it is white ? I had a hack at this in the past - I
attach my nasty patch to writer to make shockingly ugly looking
gradients in the background ;-) hopefully it shows you where to hack.
Having said that I think some of that code needs cleaning up really :-)

        ATB,

                Michael.

</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
С Уважением,
Дмитрий</pre>
  </body>
</html>