From 73bd9c7ce04b38ab7ca73661ba34d5132a739804 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 17 Jan 2011 19:14:25 +0000 Subject: [PATCH] CtrlLib: HeaderCtrl: AutoHideSb, HideSb, ArrayCtrl: AutoHideHorzSb git-svn-id: svn://ultimatepp.org/upp/trunk@3031 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CtrlLib/ArrayCtrl.h | 5 ++++- uppsrc/CtrlLib/HeaderCtrl.h | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/uppsrc/CtrlLib/ArrayCtrl.h b/uppsrc/CtrlLib/ArrayCtrl.h index 37e4670ad..54bfde49e 100644 --- a/uppsrc/CtrlLib/ArrayCtrl.h +++ b/uppsrc/CtrlLib/ArrayCtrl.h @@ -602,7 +602,10 @@ public: ArrayCtrl& NoMouseMoveCursor() { return MouseMoveCursor(false); } ArrayCtrl& AutoHideSb(bool b = true) { sb.AutoHide(b); return *this; } ArrayCtrl& NoAutoHideSb() { return AutoHideSb(false); } - ArrayCtrl& HideSb(bool b = true) { sb.Show(!b); return *this; } + ArrayCtrl& AutoHideHorzSb(bool b = true) { header.AutoHideSb(b); return *this; } + ArrayCtrl& NoAutoHideHorzSb() { return AutoHideHorzSb(false); } + ArrayCtrl& HideSb(bool b = true) { sb.Show(!b); header.HideSb(b); return *this; } + ArrayCtrl& MultiSelect(bool b = true) { multiselect = b; return *this; } bool IsMultiSelect() const { return multiselect; } ArrayCtrl& NoBackground(bool b = true) { nobg = b; Transparent(); Refresh(); return *this; } diff --git a/uppsrc/CtrlLib/HeaderCtrl.h b/uppsrc/CtrlLib/HeaderCtrl.h index 3d45accb5..35dcfcd4e 100644 --- a/uppsrc/CtrlLib/HeaderCtrl.h +++ b/uppsrc/CtrlLib/HeaderCtrl.h @@ -87,6 +87,7 @@ protected: int light; int height; const Style *style; + bool autohidesb; double Denominator() const; void Reduce(int q, double& delta, double rs, int szcx, bool checkmin); @@ -157,6 +158,9 @@ public: HeaderCtrl& Fixed(); HeaderCtrl& SetStyle(const Style& s) { style = &s; Refresh(); return *this; } HeaderCtrl& Moving(bool b = true) { moving = b; return *this; } + HeaderCtrl& AutoHideSb(bool b = true) { sb.AutoHide(sb); return *this; } + HeaderCtrl& NoAutoHideSb() { return AutoHideSb(false); } + HeaderCtrl& HideSb(bool b = true) { sb.Show(!b); return *this; } HeaderCtrl& SetScrollBarStyle(const ScrollBar::Style& s) { sb.SetStyle(s); return *this; }