コード例 #1
0
ファイル: Button.cpp プロジェクト: jomanto/le2
Button::Button()
{
  imageView.reset(new ImageView);
  imageView->name("buttonIcon");
  imageView->resizeOnImageChange = false;
  imageView->composite(false);
  imageView->backgroundColor(whiteColor);
  addSubview(imageView);

  titleLabel.reset(new Label);
  titleLabel->backgroundColor(clearColor);
  titleLabel->name("buttonTitle");
  titleLabel->composite(false);
  addSubview(titleLabel);

  _state = ButtonStateReleased;
  updateFromState();
  
  addEventHandler(ET_MouseDown, [this](Event* event) { mouseDown(event); }, EP_Bubble);
  addEventHandler(ET_MouseUpInside  , [this](Event* event) { mouseUpInside(event); }, EP_Bubble);
  addEventHandler(ET_MouseUpOutside, [this](Event* event) { mouseUpOutside(event); }, EP_Bubble);
  
  name("Button");
  layer->composite(true);
}
コード例 #2
0
AudioProcessorEditor* AdmvAudioProcessor::createEditor()
{
	auto editor = new AdmvAudioProcessorEditor (this);

	editor->updateFromState(mState);

	return editor;
}
コード例 #3
0
ファイル: Button.cpp プロジェクト: jomanto/le2
void Button::image(const ImagePtr& v, ButtonState s) { state2image[s] = v; updateFromState();  }
コード例 #4
0
ファイル: Button.cpp プロジェクト: jomanto/le2
void Button::background(const ImagePtr& v, ButtonState s) { state2background[s] = v; updateFromState();  }
コード例 #5
0
ファイル: Button.cpp プロジェクト: jomanto/le2
void Button::titleColor(const Color& v, ButtonState s) { state2titleColor[s] = v; updateFromState();  }
コード例 #6
0
ファイル: Button.cpp プロジェクト: jomanto/le2
void Button::title(const string& v, ButtonState s) { state2title[s] = v; updateFromState(); }
コード例 #7
0
ファイル: Button.cpp プロジェクト: jomanto/le2
void Button::state(ButtonState v)
{
  _state = v;
  updateFromState();
}