/src/libreoffice/include/vcl/weld/Calendar.hxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
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/. |
8 | | */ |
9 | | |
10 | | #pragma once |
11 | | |
12 | | #include <vcl/dllapi.h> |
13 | | #include <vcl/weld/Widget.hxx> |
14 | | |
15 | | class Date; |
16 | | |
17 | | namespace weld |
18 | | { |
19 | | class VCL_DLLPUBLIC Calendar : virtual public Widget |
20 | | { |
21 | | Link<Calendar&, void> m_aSelectedHdl; |
22 | | Link<Calendar&, void> m_aActivatedHdl; |
23 | | |
24 | | protected: |
25 | | void signal_selected() |
26 | 0 | { |
27 | 0 | if (notify_events_disabled()) |
28 | 0 | return; |
29 | 0 | m_aSelectedHdl.Call(*this); |
30 | 0 | } |
31 | | |
32 | | void signal_activated() |
33 | 0 | { |
34 | 0 | if (notify_events_disabled()) |
35 | 0 | return; |
36 | 0 | m_aActivatedHdl.Call(*this); |
37 | 0 | } |
38 | | |
39 | | public: |
40 | 0 | void connect_selected(const Link<Calendar&, void>& rLink) { m_aSelectedHdl = rLink; } |
41 | 0 | void connect_activated(const Link<Calendar&, void>& rLink) { m_aActivatedHdl = rLink; } |
42 | | |
43 | | virtual void set_date(const Date& rDate) = 0; |
44 | | virtual Date get_date() const = 0; |
45 | | }; |
46 | | } |
47 | | |
48 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |