void BTextControl::AttachedToWindow() { BControl::AttachedToWindow(); _UpdateTextViewColors(IsEnabled()); fText->MakeEditable(IsEnabled()); }
void BAbstractSpinner::MessageReceived(BMessage* message) { if (!IsEnabled() && message->what == B_COLORS_UPDATED) _UpdateTextViewColors(false); BControl::MessageReceived(message); }
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(); }
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); }
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(); }