コード例 #1
0
ファイル: GuiComboControls.cpp プロジェクト: Jiaheng3/GacUI
			Ptr<GuiComboBoxListControl::IItemStyleProvider> GuiComboBoxListControl::SetStyleProvider(Ptr<IItemStyleProvider> value)
			{
				RemoveStyleController();
				auto old = itemStyleProvider;
				if (itemStyleProvider)
				{
					itemStyleProvider->DetachComboBox();
				}

				itemStyleProvider = value;

				if (itemStyleProvider)
				{
					itemStyleProvider->AttachComboBox(this);
					styleController->SetTextVisible(false);
					InstallStyleController(GetSelectedIndex());
				}
				else
				{
					styleController->SetTextVisible(true);
				}

				StyleProviderChanged.Execute(GetNotifyEventArguments());
				return old;
			}
コード例 #2
0
ファイル: GuiComboControls.cpp プロジェクト: Jiaheng3/GacUI
			void GuiComboBoxListControl::OnFontChanged(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments)
			{
				if (itemStyleController)
				{
					itemStyleController->SetFont(GetFont());
				}
				OnListControlAdoptedSizeInvalidated(nullptr, GetNotifyEventArguments());
			}
コード例 #3
0
			void GuiBindableTreeView::SetChildrenProperty(const ItemProperty<Ptr<IValueEnumerable>>& value)
			{
				if (itemSource->childrenProperty != value)
				{
					itemSource->childrenProperty = value;
					itemSource->UpdateBindingProperties(true);
					ChildrenPropertyChanged.Execute(GetNotifyEventArguments());
				}
			}
コード例 #4
0
			void GuiBindableTreeView::SetTextProperty(const ItemProperty<WString>& value)
			{
				if (itemSource->textProperty != value)
				{
					itemSource->textProperty = value;
					itemSource->UpdateBindingProperties(false);
					TextPropertyChanged.Execute(GetNotifyEventArguments());
				}
			}
コード例 #5
0
			void GuiBindableTreeView::SetImageProperty(const ItemProperty<Ptr<GuiImageData>>& value)
			{
				if (itemSource->imageProperty != value)
				{
					itemSource->imageProperty = value;
					itemSource->UpdateBindingProperties(false);
					ImagePropertyChanged.Execute(GetNotifyEventArguments());
				}
			}
コード例 #6
0
			void GuiBindableTextList::SetCheckedProperty(const WritableItemProperty<bool>& value)
			{
				if (itemSource->checkedProperty != value)
				{
					itemSource->checkedProperty = value;
					itemSource->UpdateBindingProperties();
					CheckedPropertyChanged.Execute(GetNotifyEventArguments());
				}
			}
コード例 #7
0
			void GuiBindableListView::SetSmallImageProperty(const ItemProperty<Ptr<GuiImageData>>& value)
			{
				if (itemSource->smallImageProperty != value)
				{
					itemSource->smallImageProperty = value;
					itemSource->UpdateBindingProperties();
					SmallImagePropertyChanged.Execute(GetNotifyEventArguments());
				}
			}
コード例 #8
0
ファイル: GuiBasicControls.cpp プロジェクト: Crawping/GacUI
			void GuiControl::SetFont(const FontProperties& value)
			{
				if(font!=value)
				{
					font=value;
					styleController->SetFont(font);
					FontChanged.Execute(GetNotifyEventArguments());
				}
			}
コード例 #9
0
ファイル: GuiBasicControls.cpp プロジェクト: Crawping/GacUI
			void GuiControl::SetText(const WString& value)
			{
				if(text!=value)
				{
					text=value;
					styleController->SetText(text);
					TextChanged.Execute(GetNotifyEventArguments());
				}
			}
コード例 #10
0
ファイル: GuiBasicControls.cpp プロジェクト: Crawping/GacUI
			void GuiControl::SetVisible(bool value)
			{
				boundsComposition->SetVisible(value);
				if(isVisible!=value)
				{
					isVisible=value;
					VisibleChanged.Execute(GetNotifyEventArguments());
				}
			}
コード例 #11
0
ファイル: GuiBasicControls.cpp プロジェクト: Crawping/GacUI
			void GuiControl::SetEnabled(bool value)
			{
				if(isEnabled!=value)
				{
					isEnabled=value;
					EnabledChanged.Execute(GetNotifyEventArguments());
					UpdateVisuallyEnabled();
				}
			}
コード例 #12
0
ファイル: GuiBasicControls.cpp プロジェクト: Crawping/GacUI
			bool GuiControl::SetAlt(const WString& value)
			{
				if (!IGuiAltAction::IsLegalAlt(value)) return false;
				if (alt != value)
				{
					alt = value;
					AltChanged.Execute(GetNotifyEventArguments());
				}
				return true;
			}
コード例 #13
0
ファイル: GuiComboControls.cpp プロジェクト: Jiaheng3/GacUI
			void GuiComboBoxBase::SelectItem()
			{
				styleController->OnItemSelected();
				ItemSelected.Execute(GetNotifyEventArguments());
			}
コード例 #14
0
ファイル: GuiComboControls.cpp プロジェクト: Jiaheng3/GacUI
			void GuiComboBoxListControl::OnListControlSelectionChanged(compositions::GuiGraphicsComposition* sender, compositions::GuiEventArgs& arguments)
			{
				DisplaySelectedContent(GetSelectedIndex());
				SelectItem();
				SelectedIndexChanged.Execute(GetNotifyEventArguments());
			}