本文整理汇总了C++中WindowStyle::Border方法的典型用法代码示例。如果您正苦于以下问题:C++ WindowStyle::Border方法的具体用法?C++ WindowStyle::Border怎么用?C++ WindowStyle::Border使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WindowStyle
的用法示例。
在下文中一共展示了WindowStyle::Border方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetRect
void
PopupMessage::Create(const PixelRect _rc)
{
rc = _rc;
WindowStyle style;
#ifdef USE_WINUSER
style.Border();
#endif
style.Hide();
PaintWindow::Create(parent, GetRect(), style);
}
示例2: GetButtonPosition
MenuBar::MenuBar(ContainerWindow &parent, const ButtonLook &look)
{
const PixelRect rc = parent.GetClientRect();
WindowStyle style;
style.Hide();
style.Border();
for (unsigned i = 0; i < MAX_BUTTONS; ++i) {
PixelRect button_rc = GetButtonPosition(i, rc);
buttons[i].Create(parent, look, _T(""), button_rc, style);
}
}
示例3: AddBoolean
void
TerrainDisplayConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
instance = this;
RowFormWidget::Prepare(parent, rc);
const MapSettings &settings_map = CommonInterface::GetMapSettings();
const TerrainRendererSettings &terrain = settings_map.terrain;
AddBoolean(_("Terrain display"),
_("Draw a digital elevation terrain on the map."),
terrain.enable);
GetDataField(EnableTerrain).SetListener(this);
AddBoolean(_("Topography display"),
_("Draw topographical features (roads, rivers, lakes etc.) on the map."),
settings_map.topography_enabled);
static constexpr StaticEnumChoice terrain_ramp_list[] = {
{ 0, N_("Low lands"), },
{ 1, N_("Mountainous"), },
{ 2, N_("Imhof 7"), },
{ 3, N_("Imhof 4"), },
{ 4, N_("Imhof 12"), },
{ 5, N_("Imhof Atlas"), },
{ 6, N_("ICAO"), },
{ 7, N_("Grey"), },
{ 0 }
};
AddEnum(_("Terrain colors"),
_("Defines the color ramp used in terrain rendering."),
terrain_ramp_list, terrain.ramp);
GetDataField(TerrainColors).SetListener(this);
static constexpr StaticEnumChoice slope_shading_list[] = {
{ (unsigned)SlopeShading::OFF, N_("Off"), },
{ (unsigned)SlopeShading::FIXED, N_("Fixed"), },
{ (unsigned)SlopeShading::SUN, N_("Sun"), },
{ (unsigned)SlopeShading::WIND, N_("Wind"), },
{ 0 }
};
AddEnum(_("Slope shading"),
_("The terrain can be shaded among slopes to indicate either wind direction, sun position or a fixed shading from north-east."),
slope_shading_list, (unsigned)terrain.slope_shading);
GetDataField(TerrainSlopeShading).SetListener(this);
SetExpertRow(TerrainSlopeShading);
AddInteger(_("Terrain contrast"),
_("Defines the amount of Phong shading in the terrain rendering. Use large values to emphasise terrain slope, smaller values if flying in steep mountains."),
_T("%d %%"), _T("%d %%"), 0, 100, 5,
ByteToPercent(terrain.contrast));
GetDataField(TerrainContrast).SetListener(this);
SetExpertRow(TerrainContrast);
AddInteger(_("Terrain brightness"),
_("Defines the brightness (whiteness) of the terrain rendering. This controls the average illumination of the terrain."),
_T("%d %%"), _T("%d %%"), 0, 100, 5,
ByteToPercent(terrain.brightness));
GetDataField(TerrainBrightness).SetListener(this);
SetExpertRow(TerrainBrightness);
if (::terrain != NULL) {
WindowStyle style;
style.Border();
AddRemaining(new WndOwnerDrawFrame(*(ContainerWindow *)GetWindow(),
{0, 0, 100, 100},
style,
::OnPreviewPaint));
}
terrain_settings = terrain;
ShowTerrainControls();
}
示例4:
static WindowStyle
add_border(WindowStyle style)
{
style.Border();
return style;
}
示例5:
static WindowStyle
AddBorder(WindowStyle style)
{
style.Border();
return style;
}
示例6: AddBoolean
void
TerrainDisplayConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
instance = this;
RowFormWidget::Prepare(parent, rc);
const MapSettings &settings_map = CommonInterface::GetMapSettings();
const TerrainRendererSettings &terrain = settings_map.terrain;
AddBoolean(_("Terrain display"),
_("Draw a digital elevation terrain on the map."),
terrain.enable);
GetDataField(EnableTerrain).SetListener(this);
AddBoolean(_("Topography display"),
_("Draw topographical features (roads, rivers, lakes etc.) on the map."),
settings_map.topography_enabled);
static constexpr StaticEnumChoice terrain_ramp_list[] = {
{ 0, N_("Low lands"), },
{ 1, N_("Mountainous"), },
{ 2, N_("Imhof 7"), },
{ 3, N_("Imhof 4"), },
{ 4, N_("Imhof 12"), },
{ 5, N_("Imhof Atlas"), },
{ 6, N_("ICAO"), },
{ 9, N_("Vibrant"), },
{ 7, N_("Grey"), },
{ 8, N_("White"), },
{10, N_("Sandstone"), },
{11, N_("Pastel"), },
{12, N_("Italian Avioportolano VFR Chart"), },
{13, N_("German DFS VFR Chart"), },
{14, N_("French SIA VFR Chart"), },
{ 0 }
};
AddEnum(_("Terrain colors"),
_("Defines the color ramp used in terrain rendering."),
terrain_ramp_list, terrain.ramp);
GetDataField(TerrainColors).SetListener(this);
static constexpr StaticEnumChoice slope_shading_list[] = {
{ (unsigned)SlopeShading::OFF, N_("Off"), },
{ (unsigned)SlopeShading::FIXED, N_("Fixed"), },
{ (unsigned)SlopeShading::SUN, N_("Sun"), },
{ (unsigned)SlopeShading::WIND, N_("Wind"), },
{ 0 }
};
AddEnum(_("Slope shading"),
_("The terrain can be shaded among slopes to indicate either wind direction, sun position or a fixed shading from North-West."),
slope_shading_list, (unsigned)terrain.slope_shading);
GetDataField(TerrainSlopeShading).SetListener(this);
SetExpertRow(TerrainSlopeShading);
AddInteger(_("Terrain contrast"),
_("Defines the amount of Phong shading in the terrain rendering. Use large values to emphasise terrain slope, smaller values if flying in steep mountains."),
_T("%d %%"), _T("%d %%"), 0, 100, 5,
ByteToPercent(terrain.contrast));
GetDataField(TerrainContrast).SetListener(this);
SetExpertRow(TerrainContrast);
AddInteger(_("Terrain brightness"),
_("Defines the brightness (whiteness) of the terrain rendering. This controls the average illumination of the terrain."),
_T("%d %%"), _T("%d %%"), 0, 100, 5,
ByteToPercent(terrain.brightness));
GetDataField(TerrainBrightness).SetListener(this);
SetExpertRow(TerrainBrightness);
// JMW using enum here instead of bool so can provide more contour rendering
// options later
static constexpr StaticEnumChoice contours_list[] = {
{ (unsigned)Contours::OFF, N_("Off"), },
{ (unsigned)Contours::ON, N_("On"), },
{ 0 }
};
AddEnum(_("Contours"),
_("If enabled, draws contour lines on the terrain."),
contours_list, (unsigned)terrain.contours);
GetDataField(TerrainContours).SetListener(this);
SetExpertRow(TerrainContours);
if (::terrain != nullptr) {
WindowStyle style;
style.Border();
TerrainPreviewWindow *preview = new TerrainPreviewWindow(*::terrain);
preview->Create((ContainerWindow &)GetWindow(), {0, 0, 100, 100}, style);
AddRemaining(preview);
}
terrain_settings = terrain;
ShowTerrainControls();
UpdateTerrainPreview();
}