1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #ifndef GTV_APPLICATION_WINDOW_H
11 #define GTV_APPLICATION_WINDOW_H
15 #include <LibreOfficeKit/LibreOfficeKitGtk.h>
16 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
18 #include "gtv-main-toolbar.hxx"
22 struct GtvRenderingArgs
24 std::string m_aLoPath
;
25 std::string m_aUserProfile
;
26 bool m_bEnableTiledAnnotations
;
29 std::string m_aBackgroundColor
;
30 bool m_bHidePageShadow
;
31 bool m_bHideWhiteSpace
;
34 : m_bEnableTiledAnnotations(false),
36 m_bHidePageShadow(false),
37 m_bHideWhiteSpace(false)
43 #define GTV_TYPE_APPLICATION_WINDOW (gtv_application_window_get_type())
44 #define GTV_APPLICATION_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTV_TYPE_APPLICATION_WINDOW, GtvApplicationWindow))
45 #define GTV_IS_APPLICATION_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTV_TYPE_APPLICATION_WINDOW))
46 #define GTV_APPLICATION_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTV_TYPE_APPLICATION_WINDOW, GtvApplicationWindowClass))
47 #define GTV_IS_APPLICATION_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTV_TYPE_APPLICATION_WINDOW))
48 #define GTV_APPLICATION_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTV_TYPE_APPLICATION_WINDOW, GtvApplicationWindowClass))
50 struct GtvApplicationWindow
52 GtkApplicationWindow parent_instance
;
54 GtkWidget
* scrolledwindow
;
55 GtkWidget
* lokdocview
;
56 LibreOfficeKitDocumentType doctype
;
60 GtkWidget
* cornerarea
;
62 GtkWidget
* commentssidebar
;
65 GtkWidget
* redlinelabel
;
66 GtkWidget
* findbarlabel
;
67 GtkWidget
* findbarEntry
;
70 GtkWidget
* findtoolbar
;
73 struct GtvApplicationWindowClass
75 GtkApplicationWindowClass parentClass
;
78 GType
gtv_application_window_get_type (void) G_GNUC_CONST
;
80 GtvApplicationWindow
* gtv_application_window_new(GtkApplication
* application
);
82 void gtv_application_window_load_document(GtvApplicationWindow
* application
,
83 const GtvRenderingArgs
* aArgs
,
84 const std::string
& aDocPath
);
86 void gtv_application_window_create_view_from_window(GtvApplicationWindow
* window
);
88 void gtv_application_window_get_visible_area(GtvApplicationWindow
* pWindow
, GdkRectangle
* pArea
);
90 void gtv_application_window_toggle_findbar(GtvApplicationWindow
* window
);
92 GtkToolItem
* gtv_application_window_find_tool_by_unocommand(GtvApplicationWindow
* window
, const std::string
& unoCmd
);
94 GtvMainToolbar
* gtv_application_window_get_main_toolbar(GtvApplicationWindow
* window
);
96 void gtv_application_window_set_toolbar_broadcast(GtvApplicationWindow
* window
, bool broadcast
);
98 gboolean
gtv_application_window_get_toolbar_broadcast(GtvApplicationWindow
* window
);
100 void gtv_application_window_set_part_broadcast(GtvApplicationWindow
* window
, bool broadcast
);
102 gboolean
gtv_application_window_get_part_broadcast(GtvApplicationWindow
* window
);
104 void gtv_application_window_register_child_window(GtvApplicationWindow
* window
, GtkWindow
* pChildWin
);
106 void gtv_application_window_unregister_child_window(GtvApplicationWindow
* window
, GtkWindow
* pChildWin
);
108 GtkWindow
* gtv_application_window_get_child_window_by_id(GtvApplicationWindow
* window
, guint nWinId
);
110 GtkWidget
* gtv_application_window_get_parent(GtvApplicationWindow
* window
, guint nWinId
);
114 #endif /* GTV_APPLICATION_WINDOW_H */
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */