From b9cdb34c59dc133b549deed5a4f3b9bb95197cca Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 2 Dec 2021 10:02:16 +0200 Subject: Refactored CertListWidget out of the sidebar The identity list is needed elsewhere outside of the sidebar, so moved it into a specialized ListWidget class. --- src/ui/listwidget.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/ui/listwidget.h') diff --git a/src/ui/listwidget.h b/src/ui/listwidget.h index 8adf6ac3..7e6624a0 100644 --- a/src/ui/listwidget.h +++ b/src/ui/listwidget.h @@ -25,6 +25,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "scrollwidget.h" #include "paint.h" +#include #include iDeclareType(ListWidget) @@ -48,6 +49,25 @@ iDeclareObjectConstruction(ListItem) iDeclareWidgetClass(ListWidget) iDeclareObjectConstruction(ListWidget) +iDeclareType(VisBuf) + +struct Impl_ListWidget { + iWidget widget; + iScrollWidget *scroll; + iSmoothScroll scrollY; + int itemHeight; + iPtrArray items; + size_t hoverItem; + size_t dragItem; + iInt2 dragOrigin; /* offset from mouse to drag item's top-left corner */ + iClick click; + iIntSet invalidItems; + iVisBuf *visBuf; + iBool noHoverWhileScrolling; +}; + +void init_ListWidget (iListWidget *); + void setItemHeight_ListWidget (iListWidget *, int itemHeight); void invalidate_ListWidget (iListWidget *); -- cgit v1.2.3