galbrws1.hxx (3334a7e6) galbrws1.hxx (02c50d82)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 14 unchanged lines hidden (view full) ---

23
24#include <vcl/lstbox.hxx>
25#include <vcl/button.hxx>
26#include <vcl/menu.hxx>
27#include <svl/lstner.hxx>
28#include <vector>
29#include "svx/galbrws.hxx"
30
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 14 unchanged lines hidden (view full) ---

23
24#include <vcl/lstbox.hxx>
25#include <vcl/button.hxx>
26#include <vcl/menu.hxx>
27#include <svl/lstner.hxx>
28#include <vector>
29#include "svx/galbrws.hxx"
30
31#include <boost/function.hpp>
32
31// -----------------
32// - GalleryButton -
33// -----------------
34
35class GalleryButton : public PushButton
36{
37private:
38

--- 30 unchanged lines hidden (view full) ---

69
70class Gallery;
71class GalleryThemeEntry;
72class GalleryTheme;
73class VclAbstractDialog2;
74struct ExchangeData;
75class SfxItemSet;
76
33// -----------------
34// - GalleryButton -
35// -----------------
36
37class GalleryButton : public PushButton
38{
39private:
40

--- 30 unchanged lines hidden (view full) ---

71
72class Gallery;
73class GalleryThemeEntry;
74class GalleryTheme;
75class VclAbstractDialog2;
76struct ExchangeData;
77class SfxItemSet;
78
79namespace svx { namespace sidebar { class GalleryControl; } }
80
77class GalleryBrowser1 : public Control, SfxListener
78{
79 friend class GalleryBrowser;
81class GalleryBrowser1 : public Control, SfxListener
82{
83 friend class GalleryBrowser;
84 friend class svx::sidebar::GalleryControl;
80 friend class GalleryThemeListBox;
81 using Control::Notify;
82 using Window::KeyInput;
83
84private:
85
86 GalleryButton maNewTheme;
87 GalleryThemeListBox* mpThemes;
88 Gallery* mpGallery;
89 ExchangeData* mpExchangeData;
90 SfxItemSet* mpThemePropsDlgItemSet;
91
92 Image aImgNormal;
93 Image aImgDefault;
94 Image aImgReadOnly;
95 Image aImgImported;
96
85 friend class GalleryThemeListBox;
86 using Control::Notify;
87 using Window::KeyInput;
88
89private:
90
91 GalleryButton maNewTheme;
92 GalleryThemeListBox* mpThemes;
93 Gallery* mpGallery;
94 ExchangeData* mpExchangeData;
95 SfxItemSet* mpThemePropsDlgItemSet;
96
97 Image aImgNormal;
98 Image aImgDefault;
99 Image aImgReadOnly;
100 Image aImgImported;
101
102 ::boost::function<sal_Bool(const KeyEvent&,Window*)> maKeyInputHandler;
103 ::boost::function<void(void)> maThemeSlectionHandler;
104
97 void ImplAdjustControls();
98 sal_uIntPtr ImplInsertThemeEntry( const GalleryThemeEntry* pEntry );
99 void ImplFillExchangeData( const GalleryTheme* pThm, ExchangeData& rData );
100 void ImplGetExecuteVector(::std::vector< sal_uInt16 >& o_aExec);
101 void ImplExecute( sal_uInt16 nId );
102 void ImplGalleryThemeProperties( const String & rThemeName, bool bCreateNew );
103 void ImplEndGalleryThemeProperties( VclAbstractDialog2* pDialog, bool bCreateNew );
104

--- 9 unchanged lines hidden (view full) ---

114 DECL_LINK( ShowContextMenuHdl, void* );
115 DECL_LINK( PopupMenuHdl, Menu* );
116 DECL_LINK( EndNewThemePropertiesDlgHdl, VclAbstractDialog2* );
117 DECL_LINK( EndThemePropertiesDlgHdl, VclAbstractDialog2* );
118 DECL_LINK( DestroyThemePropertiesDlgHdl, VclAbstractDialog2* );
119
120public:
121
105 void ImplAdjustControls();
106 sal_uIntPtr ImplInsertThemeEntry( const GalleryThemeEntry* pEntry );
107 void ImplFillExchangeData( const GalleryTheme* pThm, ExchangeData& rData );
108 void ImplGetExecuteVector(::std::vector< sal_uInt16 >& o_aExec);
109 void ImplExecute( sal_uInt16 nId );
110 void ImplGalleryThemeProperties( const String & rThemeName, bool bCreateNew );
111 void ImplEndGalleryThemeProperties( VclAbstractDialog2* pDialog, bool bCreateNew );
112

--- 9 unchanged lines hidden (view full) ---

122 DECL_LINK( ShowContextMenuHdl, void* );
123 DECL_LINK( PopupMenuHdl, Menu* );
124 DECL_LINK( EndNewThemePropertiesDlgHdl, VclAbstractDialog2* );
125 DECL_LINK( EndThemePropertiesDlgHdl, VclAbstractDialog2* );
126 DECL_LINK( DestroyThemePropertiesDlgHdl, VclAbstractDialog2* );
127
128public:
129
122 GalleryBrowser1( GalleryBrowser* pParent, const ResId& rResId, Gallery* pGallery );
123 ~GalleryBrowser1();
130 GalleryBrowser1(
131 Window* pParent,
132 const ResId& rResId,
133 Gallery* pGallery,
134 const ::boost::function<sal_Bool(const KeyEvent&,Window*)>& rKeyInputHandler,
135 const ::boost::function<void(void)>& rThemeSlectionHandler);
136 ~GalleryBrowser1();
124
125 void SelectTheme( const String& rThemeName ) { mpThemes->SelectEntry( rThemeName ); SelectThemeHdl( NULL ); }
126 void SelectTheme( sal_uIntPtr nThemePos ) { mpThemes->SelectEntryPos( (sal_uInt16) nThemePos ); SelectThemeHdl( NULL ); }
127 String GetSelectedTheme() { return mpThemes->GetEntryCount() ? mpThemes->GetEntry( mpThemes->GetSelectEntryPos() ) : String(); }
128
129 void ShowContextMenu();
130 sal_Bool KeyInput( const KeyEvent& rKEvt, Window* pWindow );
131};
137
138 void SelectTheme( const String& rThemeName ) { mpThemes->SelectEntry( rThemeName ); SelectThemeHdl( NULL ); }
139 void SelectTheme( sal_uIntPtr nThemePos ) { mpThemes->SelectEntryPos( (sal_uInt16) nThemePos ); SelectThemeHdl( NULL ); }
140 String GetSelectedTheme() { return mpThemes->GetEntryCount() ? mpThemes->GetEntry( mpThemes->GetSelectEntryPos() ) : String(); }
141
142 void ShowContextMenu();
143 sal_Bool KeyInput( const KeyEvent& rKEvt, Window* pWindow );
144};