ResourceManager.hxx (f120fe41) | ResourceManager.hxx (13e1c3b4) |
---|---|
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 --- 34 unchanged lines hidden (view full) --- 43 methods so that the sidebar can easily decide which content panels 44 to display for a certain context. 45*/ 46class ResourceManager 47{ 48public: 49 static ResourceManager& Instance (void); 50 | 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 --- 34 unchanged lines hidden (view full) --- 43 methods so that the sidebar can easily decide which content panels 44 to display for a certain context. 45*/ 46class ResourceManager 47{ 48public: 49 static ResourceManager& Instance (void); 50 |
51 const DeckDescriptor* GetBestMatchingDeck ( 52 const Context& rContext, 53 const cssu::Reference<css::frame::XFrame>& rxFrame); 54 | |
55 const DeckDescriptor* GetDeckDescriptor ( 56 const ::rtl::OUString& rsDeckId) const; 57 const PanelDescriptor* GetPanelDescriptor ( 58 const ::rtl::OUString& rsPanelId) const; 59 60 /** Excluded or include a deck from being displayed in the tab 61 bar. 62 Note that this value is not persistent. 63 The flag can not be set directly at a DeckDescriptor object 64 because the ResourceManager gives access to to them only 65 read-only. 66 */ 67 void SetIsDeckEnabled ( 68 const ::rtl::OUString& rsDeckId, 69 const bool bIsEnabled); 70 | 51 const DeckDescriptor* GetDeckDescriptor ( 52 const ::rtl::OUString& rsDeckId) const; 53 const PanelDescriptor* GetPanelDescriptor ( 54 const ::rtl::OUString& rsPanelId) const; 55 56 /** Excluded or include a deck from being displayed in the tab 57 bar. 58 Note that this value is not persistent. 59 The flag can not be set directly at a DeckDescriptor object 60 because the ResourceManager gives access to to them only 61 read-only. 62 */ 63 void SetIsDeckEnabled ( 64 const ::rtl::OUString& rsDeckId, 65 const bool bIsEnabled); 66 |
71 typedef ::std::vector<rtl::OUString> IdContainer; | 67 class DeckContextDescriptor 68 { 69 public: 70 ::rtl::OUString msId; 71 bool mbIsEnabled; 72 }; 73 typedef ::std::vector<DeckContextDescriptor> DeckContextDescriptorContainer; 74 |
72 class PanelContextDescriptor 73 { 74 public: 75 ::rtl::OUString msId; 76 ::rtl::OUString msMenuCommand; 77 bool mbIsInitiallyVisible; | 75 class PanelContextDescriptor 76 { 77 public: 78 ::rtl::OUString msId; 79 ::rtl::OUString msMenuCommand; 80 bool mbIsInitiallyVisible; |
81 bool mbShowForReadOnlyDocuments; |
|
78 }; 79 typedef ::std::vector<PanelContextDescriptor> PanelContextDescriptorContainer; 80 | 82 }; 83 typedef ::std::vector<PanelContextDescriptor> PanelContextDescriptorContainer; 84 |
81 const IdContainer& GetMatchingDecks ( 82 IdContainer& rDeckDescriptors, | 85 const DeckContextDescriptorContainer& GetMatchingDecks ( 86 DeckContextDescriptorContainer& rDeckDescriptors, |
83 const Context& rContext, | 87 const Context& rContext, |
88 const bool bIsDocumentReadOnly, |
|
84 const cssu::Reference<css::frame::XFrame>& rxFrame); 85 86 const PanelContextDescriptorContainer& GetMatchingPanels ( 87 PanelContextDescriptorContainer& rPanelDescriptors, 88 const Context& rContext, 89 const ::rtl::OUString& rsDeckId, 90 const cssu::Reference<css::frame::XFrame>& rxFrame); 91 --- 20 unchanged lines hidden (view full) --- 112 const ::rtl::OUString& rsDefaultMenuCommand) const; 113 void ReadLegacyAddons ( 114 const cssu::Reference<css::frame::XFrame>& rxFrame); 115 ::utl::OConfigurationTreeRoot GetLegacyAddonRootNode ( 116 const ::rtl::OUString& rsModuleName) const; 117 void GetToolPanelNodeNames ( 118 ::std::vector<rtl::OUString>& rMatchingNames, 119 const ::utl::OConfigurationTreeRoot aRoot) const; | 89 const cssu::Reference<css::frame::XFrame>& rxFrame); 90 91 const PanelContextDescriptorContainer& GetMatchingPanels ( 92 PanelContextDescriptorContainer& rPanelDescriptors, 93 const Context& rContext, 94 const ::rtl::OUString& rsDeckId, 95 const cssu::Reference<css::frame::XFrame>& rxFrame); 96 --- 20 unchanged lines hidden (view full) --- 117 const ::rtl::OUString& rsDefaultMenuCommand) const; 118 void ReadLegacyAddons ( 119 const cssu::Reference<css::frame::XFrame>& rxFrame); 120 ::utl::OConfigurationTreeRoot GetLegacyAddonRootNode ( 121 const ::rtl::OUString& rsModuleName) const; 122 void GetToolPanelNodeNames ( 123 ::std::vector<rtl::OUString>& rMatchingNames, 124 const ::utl::OConfigurationTreeRoot aRoot) const; |
125 bool IsDeckEnabled ( 126 const ::rtl::OUString& rsDeckId, 127 const Context& rContext, 128 const cssu::Reference<css::frame::XFrame>& rxFrame) const; |
|
120}; 121 122 123} } // end of namespace sfx2::sidebar 124 125#endif | 129}; 130 131 132} } // end of namespace sfx2::sidebar 133 134#endif |