From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- .../qa/gtktiledviewer/gtv-calc-header-bar.hxx | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.hxx (limited to 'libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.hxx') diff --git a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.hxx b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.hxx new file mode 100644 index 000000000..a1a4d37a3 --- /dev/null +++ b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.hxx @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef GTV_CALC_HEADER_BAR_H +#define GTV_CALC_HEADER_BAR_H + +#include + +#include + +G_BEGIN_DECLS + +#define GTV_TYPE_CALC_HEADER_BAR (gtv_calc_header_bar_get_type()) +#define GTV_CALC_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTV_TYPE_CALC_HEADER_BAR, GtvCalcHeaderBar)) +#define GTV_IS_CALC_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTV_TYPE_CALC_HEADER_BAR)) +#define GTV_CALC_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTV_TYPE_CALC_HEADER_BAR, GtvCalcHeaderBarClass)) +#define GTV_IS_CALC_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTV_TYPE_CALC_HEADER_BAR)) +#define GTV_CALC_HEADER_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTV_TYPE_CALC_HEADER_BAR, GtvCalcHeaderBarClass)) + +struct GtvCalcHeaderBar +{ + GtkDrawingArea parent; + /// Height for row bar, width for column bar. + int m_nSizePixel; + /// Left/top position for the column/row bar -- initially 0, then may grow due to scrolling. + int m_nPositionPixel; +}; + +struct GtvCalcHeaderBarClass +{ + GtkDrawingAreaClass parentClass; +}; + +GType gtv_calc_header_bar_get_type (void) G_GNUC_CONST; + +enum CalcHeaderType { ROW, COLUMN, CORNER, NONE }; + +GtkWidget* gtv_calc_header_bar_new(); + +void gtv_calc_header_bar_configure(GtvCalcHeaderBar* bar, const boost::property_tree::ptree* values); + +int gtv_calc_header_bar_get_pos_pixel(GtvCalcHeaderBar* bar); + +int gtv_calc_header_bar_get_size_pixel(GtvCalcHeaderBar* bar); + +void gtv_calc_header_bar_set_type_and_width(GtvCalcHeaderBar* bar, CalcHeaderType eType); + +G_END_DECLS + +#endif /* GTV_CALC_HEADER_BAR_H */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3