本文整理汇总了C++中TextEditor::findColour方法的典型用法代码示例。如果您正苦于以下问题:C++ TextEditor::findColour方法的具体用法?C++ TextEditor::findColour怎么用?C++ TextEditor::findColour使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextEditor
的用法示例。
在下文中一共展示了TextEditor::findColour方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawTextEditorOutline
void NonShinyLookAndFeel::drawTextEditorOutline (Graphics& g, int width, int height, TextEditor& textEditor)
{
if (textEditor.isEnabled())
{
if (textEditor.hasKeyboardFocus (true) && ! textEditor.isReadOnly())
{
const int border = 2;
g.setColour (textEditor.findColour (TextEditor::focusedOutlineColourId));
g.drawRect (0, 0, width, height, border);
g.setOpacity (1.0f);
const Colour shadowColour (textEditor.findColour (TextEditor::shadowColourId).withMultipliedAlpha (0.75f));
drawBevel (g, 0, 0, width, height + 2, border + 2, shadowColour, shadowColour);
}
else
{
g.setColour (textEditor.findColour (TextEditor::outlineColourId));
g.drawRect (0, 0, width, height);
g.setOpacity (1.0f);
const Colour shadowColour (textEditor.findColour (TextEditor::shadowColourId));
drawBevel (g, 0, 0, width, height + 2, 3, shadowColour, shadowColour);
}
}
}
示例2: fillTextEditorBackground
void ProjucerLookAndFeel::fillTextEditorBackground (Graphics& g, int width, int height, TextEditor& textEditor)
{
g.setColour (textEditor.findColour (TextEditor::backgroundColourId));
g.fillRect (0, 0, width, height);
g.setColour (textEditor.findColour (TextEditor::outlineColourId));
g.drawHorizontalLine (height - 1, 0.0f, static_cast<float> (width));
}
示例3: drawTextEditorOutline
//==============================================================================
void OldSchoolLookAndFeel::drawTextEditorOutline (Graphics& g, int width, int height, TextEditor& textEditor)
{
if (textEditor.isEnabled())
{
g.setColour (textEditor.findColour (TextEditor::outlineColourId));
g.drawRect (0, 0, width, height);
}
}