[Libreoffice] [GSOC] Multiline inputbar

2011-06-27 Thread Anurag Jain
Hello Noel,

Here I got some chance to play with MS Excel 2010 and I analyzed the
behavior of inputbar. I'm sending an image here showing the desire
behavior.

The first figure in the image shows the normal behavior showing only a
single line and keep on wrapping the content text on overflows.This is
what has already been done in single line mode.

2: Second thing is to enable the button press. On button press as you
can see, only two lines are shown and scrollbar shifts its position
below the button (that is probably to make the UI consistent adjusting
the button and scrollbar in double the height of the line. This
actually does  not affect the text output area, just makes things
consistent).Scrollbar works same way scrolling single line at a
time.This can be said as multiline mode.

3: The third thing is to make the inputbar re-sizable on the mouse
drag. On hovering the down edge of the inputbar here the cursor
changes and can be dragged to show the hidden contents (this also
happens in units of single line height. Also here the scrollbar's
thumb size changes depending on the height of the inputbar.)

So if this is implemented in similar way it can be good UI enhancement
to LO. As of now I'm trying to set the position of the scrollbar and
button, making them appear at the right place i.e. after the inputbar.
Also as of now I do not have any idea about the implementing the
resizing of inputbar. As I've already sent the patch for fixing the
width, height and border of the InputBarGroup and after i get the
positions correctly we can start working on these improvements.

Thanks and regards

-- 
Anurag Jain
Final yr B.Tech CSE
SASTRA University
Thanjavur(T.N.)-613402
attachment: 1.JPG___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [GSOC] Multiline inputbar

2011-06-27 Thread Noel Power

On 27/06/11 09:24, Anurag Jain wrote:

Hello Noel,

Here I got some chance to play with MS Excel 2010 and I analyzed the
behavior of inputbar. I'm sending an image here showing the desire
behavior.

The first figure in the image shows the normal behavior showing only a
single line and keep on wrapping the content text on overflows.This is
what has already been done in single line mode.

2: Second thing is to enable the button press. On button press as you
can see, only two lines are shown and scrollbar shifts its position
below the button (that is probably to make the UI consistent adjusting
the button and scrollbar in double the height of the line. This
actually does  not affect the text output area, just makes things
consistent).Scrollbar works same way scrolling single line at a
time.This can be said as multiline mode.

3: The third thing is to make the inputbar re-sizable on the mouse
drag. On hovering the down edge of the inputbar here the cursor
changes and can be dragged to show the hidden contents (this also
happens in units of single line height. Also here the scrollbar's
thumb size changes depending on the height of the inputbar.)

So if this is implemented in similar way it can be good UI enhancement
to LO. As of now I'm trying to set the position of the scrollbar and
button, making them appear at the right place i.e. after the inputbar.
Also as of now I do not have any idea about the implementing the
resizing of inputbar. As I've already sent the patch for fixing the
width, height and border of the InputBarGroup and after i get the
positions correctly we can start working on these improvements.


so I would not get overly hung up by this, we don't have to have exactly 
the same arrangement, I think a workable and useful first cut is as 
Kohei and I mentioned already


1st pass

- single line mode ( you have this already ) but you need to add a new 
button for switching the mode ( don't even worry about a scrollbar )
- multi-line mode, same as above but give a 'bigger' input area, maybe 
5+ lines ( for the first pass I wouldn't even care about a scrollbar too 
much, just get it switching nicely, button placed properly etc.


2nd pass

- single line mode as above
- multi-line mode as above but with the scrollbar placed underneath the 
button


after you get the above working then you could try and make it a bit 
sexier with adding the scrollbar in single line mode and some of the 
other behaviour


thanks

Noel

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [GSOC] Multiline inputbar

2011-06-27 Thread Noel Power

On 27/06/11 12:14, Noel Power wrote:
so I would not get overly hung up by this, we don't have to have 
exactly the same arrangement, I think a workable and useful first cut 
is as Kohei and I mentioned already
oh and before I forget, I wouldn't even think about resizing by dragging 
with the mouse at least right now

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [GSOC] Multiline Inputbar

2011-06-15 Thread Anurag Jain
Hi Kohei,

Here I'm drafting the basic flow work for implementing my task. As of
now this mainly focus on Scrollbar but I'll be expanding on it for the
button also.

1:Creating a contain class inheriting Window class with the objects
ScinputWnd, ScrollBar and PushButton.

2: Now the ScInputWnd which used to contain the object or ScTextWnd
i.e. aTextWnd will now have the object of this new class and all the
functions of ScInputWindow which used to use aTextWnd to call the
ScTextWnd function, will now call the similar functions defined in
this new class which again will call the underlying ScTextWnd
functions.

So the hierarchy can be ScInputWindow---NewClass---ScTextwnd

3: Now in the constructor I'd initialize attributes of ScrollBar like
Start position, Thumb pixel size, Thumb pixel range, Thumb pixel
position, Page Size, Line Size and Visible Size (What is it actually
?).

4: Embed this object of new class into the InsertWindow() function of
ScInputWindow.

This is my outline so far as I've understood the track. Please correct
me if there is anything which I'm missing. I'm going through the
scrollbar code as of now.

@Kohei Can you point me to some code where scrollbar has got similar
implementation ?


Thanks and regards.
-- 
Anurag Jain
Final yr B.Tech CSE
SASTRA University
Thanjavur(T.N.)-613402
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [GSOC] Multiline Inputbar

2011-06-15 Thread Kohei Yoshida
Hi Anurag,

On Wed, 2011-06-15 at 13:29 +0530, Anurag Jain wrote:

 Here I'm drafting the basic flow work for implementing my task. As of
 now this mainly focus on Scrollbar but I'll be expanding on it for the
 button also.
 
 1:Creating a contain class inheriting Window class with the objects
 ScinputWnd, ScrollBar and PushButton.

Assuming that ScinputWnd is ScInputWindow, you got it 90%, but it's not
exactly what I suggested.  But perhaps you meant ScTextWnd? in which
case you got it right 100%.

Just in case you meant ScInputWindow, let me re-iterate my suggestion.
ScInputWindow will stay as-is GUI-hierarchy-wise.  My suggestion was to
create a new container class that will be a child control of
ScInputWindow, to take the place of where ScTextWnd currently is.  Let's
name this child container control ScInputBarGroup just for this
discussion (to make it easier to reference it).  ScInputWindow will
contain, as its immediate child controls, ScPosWnd (that's the name
range box), the three buttons (function wizard, sum, and function), and
ScInputBarGroup.  ScTextWnd will no longer be a direct child of
ScInputWindow in this new layout.

Then, ScInputBarGroup will contain, as its immediate childs, ScTextWnd,
a scroll bar, and a push button.

But reading your other replies below, I think you understand this
correctly.

 2: Now the ScInputWnd which used to contain the object or ScTextWnd
 i.e. aTextWnd will now have the object of this new class and all the
 functions of ScInputWindow which used to use aTextWnd to call the
 ScTextWnd function, will now call the similar functions defined in
 this new class which again will call the underlying ScTextWnd
 functions.

Yes.  This you got 100% right.

 So the hierarchy can be ScInputWindow---NewClass---ScTextwnd

Yes.  I guess your understanding is right on.

 3: Now in the constructor I'd initialize attributes of ScrollBar like
 Start position, Thumb pixel size, Thumb pixel range, Thumb pixel
 position, Page Size, Line Size and Visible Size (What is it actually
 ?).

So, I'm not exactly sure what the line size, visible size, page, size
etc mean.  Hopefully someone who is more versed with the ScrollBar class
can answer that.

Having said that, for the simplest use cases of ScrollBar, you can just
set the page, line and visible sizes to 1, then only play with the min
and max range values.

 4: Embed this object of new class into the InsertWindow() function of
 ScInputWindow.

Yes.  You got it.

 This is my outline so far as I've understood the track. Please correct
 me if there is anything which I'm missing. I'm going through the
 scrollbar code as of now.

I think you got it all right.

 @Kohei Can you point me to some code where scrollbar has got similar
 implementation ?

There are plenty of reference use case of ScrollBar across Calc's code.
Running

  git grep ScrollBar\ .*ma

shows several places where ScrollBar is used.  Based on that, you can
perhaps take a look at

ScCsvTableBox - which implements the preview window in the CSV import
option dialog.
ScOptSolverDlg - which implements the solver dialog (Tools - Solver).

All the other uses are somewhat more complex, so I would look at those
two classes to learn how to use ScrollBar class if I were you.

Good luck, and please keep us informed of your progress, with the list
and/or with Noel while I'm away. :-)

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc
kyosh...@novell.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice