本文整理汇总了C++中JXColormap::GetCyanColor方法的典型用法代码示例。如果您正苦于以下问题:C++ JXColormap::GetCyanColor方法的具体用法?C++ JXColormap::GetCyanColor怎么用?C++ JXColormap::GetCyanColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXColormap
的用法示例。
在下文中一共展示了JXColormap::GetCyanColor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetColormap
void
CBEditTextPrefsDialog::SetReverseVideoColors()
{
JXColormap* cmap = GetColormap();
ChangeColor(CBPrefsManager::kTextColorIndex, cmap->GetWhiteColor());
ChangeColor(CBPrefsManager::kBackColorIndex, cmap->GetBlackColor());
ChangeColor(CBPrefsManager::kCaretColorIndex, cmap->GetWhiteColor());
ChangeColor(CBPrefsManager::kSelColorIndex, cmap->GetBlueColor());
ChangeColor(CBPrefsManager::kSelLineColorIndex, cmap->GetCyanColor());
ChangeColor(CBPrefsManager::kRightMarginColorIndex, cmap->GetGrayColor(80));
}
示例2: GetColormap
void
ClipboardWidget::Draw
(
JXWindowPainter& p,
const JRect& rect
)
{
// We need the colormap in order to specify colors.
JXColormap* cmap = GetColormap();
// This is where everything happens
// See JPainter.h for available functions
// This sets the color of the pen.
p.SetPenColor(cmap->GetCyanColor());
// This draws our rectangle.
p.Rect(10, 10, 150, 50);
// This draws itsText.
p.String(20,20,itsText,
130, JPainter::kHAlignCenter,
30, JPainter::kVAlignCenter);
}
示例3: JXTextButton
//.........这里部分代码省略.........
assert( adviceMenu != NULL );
adviceMenu->SetMenuItems(kAdviceMenuStr[i-1]);
adviceMenu->SetUpdateAction(JXMenu::kDisableNone);
if (i == kAdviceBoldMenuIndex)
{
adviceMenu->SetItemFontStyle(2,
JFontStyle(kJTrue, kJFalse, 0, kJFalse, GetColormap()->GetBlackColor()));
}
prevMenu = adviceMenu;
prevMenuIndex = 2;
}
BuildXlsfontsMenu(itsActionsMenu, menuBar);
// secret menus are a bad idea because the user can't find them!
itsSecretMenu = jnew JXTextMenu("", this, kFixedLeft, kFixedTop, 0,0, 10,10);
assert( itsSecretMenu != NULL );
itsSecretMenu->SetMenuItems(kSecretMenuStr);
itsSecretMenu->SetUpdateAction(JXMenu::kDisableNone);
itsSecretMenu->SetToHiddenPopupMenu(kJTrue); // will assert() otherwise
itsSecretMenu->Hide();
ListenTo(itsSecretMenu);
itsSecretSubmenu = jnew JXTextMenu(itsSecretMenu, kSecretSubmenuIndex, this);
assert( itsSecretSubmenu != NULL );
itsSecretSubmenu->SetMenuItems(kSecretSubmenuStr);
itsSecretSubmenu->SetUpdateAction(JXMenu::kDisableNone);
// we don't ListenTo() it because it's only there for show
// image from xpm
itsXPMImage = jnew JXImage(GetDisplay(), JXPM(macapp_xpm));
assert( itsXPMImage != NULL );
// partial image from image
itsPartialXPMImage = jnew JXImage(*itsXPMImage, JRect(5,5,14,16));
assert( itsPartialXPMImage != NULL );
// home symbol
itsHomeImage = jnew JXImage(GetDisplay(), JXPM(home_xpm));
assert( itsHomeImage != NULL );
itsHomeRect = itsHomeImage->GetBounds();
itsHomeRect.Shift(120, 10);
// buffer contents of Widget in JXImage
itsImageBuffer = NULL;
if (isImage)
{
CreateImageBuffer();
}
// initial size
SetBounds(400,400);
// enclosed objects
itsAnimButton =
jnew JXTextButton("Start", this, JXWidget::kFixedLeft, JXWidget::kFixedTop,
37,175, 50,30);
assert( itsAnimButton != NULL );
itsAnimButton->SetShortcuts("#A");
ListenTo(itsAnimButton);
if (isMaster)
{
itsQuitButton =
jnew JXTextButton(JGetString("Quit::TestWidget"), this, JXWidget::kFixedRight, JXWidget::kFixedBottom,
x,y, 50,30);
assert( itsQuitButton != NULL );
JXColormap* colormap = GetColormap();
itsQuitButton->CenterWithinEnclosure(kJTrue, kJTrue);
itsQuitButton->SetFontStyle(JFontStyle(kJTrue, kJFalse, 0, kJFalse, colormap->GetRedColor()));
itsQuitButton->SetNormalColor(colormap->GetCyanColor());
itsQuitButton->SetPushedColor(colormap->GetBlueColor());
ListenTo(itsQuitButton);
}
else
{
itsQuitButton = NULL;
}
ExpandToFitContent();
// drops on iconfied window
JXWindowIcon* windowIcon;
const JBoolean hasIconWindow = GetWindow()->GetIconWidget(&windowIcon);
assert( hasIconWindow );
ListenTo(windowIcon);
}