LibreOffice Module vcl (master) 1
roadmapwizard.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_VCL_ROADMAPWIZARD_HXX
21#define INCLUDED_VCL_ROADMAPWIZARD_HXX
22
23#include <memory>
24#include <vcl/dllapi.h>
25#include <vcl/wizardmachine.hxx>
26
27namespace vcl
28{
29 struct RoadmapWizardImpl;
30
31 namespace RoadmapWizardTypes
32 {
33 typedef sal_Int16 PathId;
34 typedef ::std::vector< WizardTypes::WizardState > WizardPath;
35 };
36
37 //= RoadmapWizard
38
59 {
60 private:
61 std::unique_ptr<RoadmapWizardImpl> m_pImpl;
62
63 public:
65 virtual ~RoadmapWizardMachine( ) override;
66
67 void SetRoadmapHelpId( const OUString& _rId );
68
69 // returns whether a given state is enabled
70 bool isStateEnabled(WizardTypes::WizardState nState) const;
71
72 // WizardDialog overridables
73 virtual bool canAdvance() const override;
74 virtual void updateTravelUI() override;
75
76 protected:
94 void declarePath( RoadmapWizardTypes::PathId _nPathId, const RoadmapWizardTypes::WizardPath& _lWizardStates);
95
127 void activatePath( RoadmapWizardTypes::PathId _nPathId, bool _bDecideForIt = false );
128
136 virtual WizardTypes::WizardState determineNextState(WizardTypes::WizardState nCurrentState) const override;
137
158 void enableState(WizardTypes::WizardState nState, bool _bEnable = true);
159
162 bool knowsState(WizardTypes::WizardState nState) const;
163
164 // WizardMachine overriables
165 virtual void enterState(WizardTypes::WizardState nState) override;
166
174 virtual OUString getStateDisplayName(WizardTypes::WizardState nState) const;
175
176 private:
177 DECL_DLLPRIVATE_LINK( OnRoadmapItemSelected, const OUString&, bool );
178
182 VCL_DLLPRIVATE void implUpdateRoadmap( );
183 };
184} // namespace vcl
185
186
187#endif // OOO_ INCLUDED_VCL_ROADMAPWIZARD_HXX
188
189/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
is - no, not a wizard for a roadmap, but the base class for wizards supporting a roadmap.
std::unique_ptr< RoadmapWizardImpl > m_pImpl
DECL_DLLPRIVATE_LINK(OnRoadmapItemSelected, const OUString &, bool)
implements some kind of finite automata, where the states of the automata exactly correlate with tab ...
#define VCL_DLLPRIVATE
Definition: dllapi.h:31
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
::std::vector< WizardTypes::WizardState > WizardPath
sal_Int16 WizardState