Angus Leeming wrote:
Abdelrazak Younes <[EMAIL PROTECTED]> writes:
Index: BufferView.h
===================================================================
+struct ScrollbarParameters
I get nervous when I see a class containing PODs but without a default
constructor. I'd prefer to see
ScrollbarParameters() { reset(); }
Well, I find handy that struct in C++ have everything public and don't
need an explicit constructor. Do you want me to convert that to a class?
Or if are nervous with the reset() method I could as well delete it (I
don't really need it) and use the struct member as is:
struct ScrollbarParameters
{
/// The total document height in pixels
int height;
/// The current position in the document, in pixels
int position;
/// the line-scroll amount, in pixels
int lineScrollHeight;
};
What POS means anyway?
Index: BufferView_pimpl.h
===================================================================
+ ScrollbarParameters const & scrollbarParameters() const;
+ ///
Do you need this accessor as well as BufferView::scrollbarParameters()? I guess
you guarantee that you don't modify the variable when you use the accessor.
Well, scrollbarParameters_ is private but I could make it protected and
use that directly in BufferView. I see just now that BufferView is
declared friend in BufferView_pimpl. You would prefer that?
+ ///
+ int width() const;
+ ///
+ int height() const;
Doxygen comments please. width, height in what units? Of what?
Sure.
Index: frontends/qt4/GuiWorkArea.C
===================================================================
+
+ buffer_view_->updateScrollbar();
+
+ ScrollbarParameters const & scroll_ =
buffer_view_->scrollbarParameters();
+
+ verticalScrollBar()->setTracking(false);
+ setScrollbarParams(scroll_.height, scroll_.position,
+ scroll_.lineScrollHeight);
+ verticalScrollBar()->setTracking(true);
Hmmm... why is change tracking settable from the WorkArea? (Totally ignorant
about this CT stuff but surely it's a property of the Buffer, not the View?)
This has nothing to do with CT :-). This is part of Qt4 API for sliders.
Abdel.