コード例 #1
0
ファイル: TextControl.cpp プロジェクト: mmanley/Antares
void
BTextControl::AttachedToWindow()
{
	BControl::AttachedToWindow();

	_UpdateTextViewColors(IsEnabled());
	fText->MakeEditable(IsEnabled());
}
コード例 #2
0
ファイル: AbstractSpinner.cpp プロジェクト: bhanug/haiku
void
BAbstractSpinner::MessageReceived(BMessage* message)
{
	if (!IsEnabled() && message->what == B_COLORS_UPDATED)
		_UpdateTextViewColors(false);

	BControl::MessageReceived(message);
}
コード例 #3
0
ファイル: AbstractSpinner.cpp プロジェクト: simonsouth/haiku
void
BAbstractSpinner::AttachedToWindow()
{
	if (!Messenger().IsValid())
		SetTarget(Window());

	BControl::SetValue(Value());
		// sets the text and enables or disables the arrows

	_UpdateTextViewColors(IsEnabled());
	fTextView->MakeEditable(IsEnabled());

	BView::AttachedToWindow();
}
コード例 #4
0
ファイル: TextControl.cpp プロジェクト: mmanley/Antares
void
BTextControl::SetEnabled(bool enabled)
{
	if (IsEnabled() == enabled)
		return;

	if (Window()) {
		fText->MakeEditable(enabled);
		if (enabled)
			fText->SetFlags(fText->Flags() | B_NAVIGABLE);
		else
			fText->SetFlags(fText->Flags() & ~B_NAVIGABLE);

		_UpdateTextViewColors(enabled);

		fText->Invalidate();
		Window()->UpdateIfNeeded();
	}

	BControl::SetEnabled(enabled);
}
コード例 #5
0
ファイル: AbstractSpinner.cpp プロジェクト: simonsouth/haiku
void
BAbstractSpinner::SetEnabled(bool enable)
{
	if (IsEnabled() == enable)
		return;

	BControl::SetEnabled(enable);

	fTextView->MakeEditable(enable);
	if (enable)
		fTextView->SetFlags(fTextView->Flags() | B_NAVIGABLE);
	else
		fTextView->SetFlags(fTextView->Flags() & ~B_NAVIGABLE);

	_UpdateTextViewColors(enable);
	fTextView->Invalidate();

	_LayoutTextView();
	Invalidate();
	if (Window() != NULL)
		Window()->UpdateIfNeeded();
}