📄 layoutcolor.hpp
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
//
#pragma once
#ifndef __LAYOUT_HPP__
#define __LAYOUT_HPP__
#include <windows.h>
#include "Common.hpp"
class Layout_t
{
public:
static
HRESULT
InitializeRCData(
void
);
#define DECLARE_METRIC(MetricName) \
static int MetricName()
#define DECLARE_MARGINS(MetricName) \
static int MetricName##LeftMargin(); \
static int MetricName##RightMargin(); \
static int MetricName##TopMargin(); \
static int MetricName##BottomMargin()
#define DECLARE_SIZE(MetricName) \
static int MetricName##Width(); \
static int MetricName##Height()
#define DECLARE_ADJUSTMENT_MARGINS(MetricName) \
static int MetricName##AfterLabelMargin();\
static int MetricName##TopMargin();\
static int MetricName##RightMargin();\
static int MetricName##BottomMargin()
DECLARE_METRIC(CallDurationWidth);
DECLARE_METRIC(CallControlLabelMarginWidth);
DECLARE_METRIC(TransferEditFromTop);
DECLARE_METRIC(CallItemHeight);
DECLARE_SIZE(CallGlyph);
DECLARE_MARGINS(CallText);
DECLARE_ADJUSTMENT_MARGINS(DialingState);
DECLARE_ADJUSTMENT_MARGINS(TransferringState);
private:
struct Margins_t
{
short m_LeftMargin;
short m_TopMargin;
short m_RightMargin;
short m_BottomMargin;
};
struct Size_t
{
short m_Width;
short m_Height;
};
struct AdjustmentMargins_t
{
short m_AfterLabelMargin;
short m_RightMargin;
short m_TopMargin;
short m_BottomMargin;
};
struct MetricsRCData_t
{
short m_CallDurationWidth;
short m_CallControlLabelMarginWidth;
short m_TransferEditFromTop;
short m_CallItemHeight;
Size_t m_CallGlyphSize;
Margins_t m_CallTextMargins;
AdjustmentMargins_t m_DialingStateAdjustmentMargins;
AdjustmentMargins_t m_TransferringStateAdjustmentMargins;
};
static const MetricsRCData_t* s_pMetrics;
};
class Colors_t
{
public:
static
HRESULT
InitializeRCData(
void
);
#define DECLARE_COLOR(ColorName) \
static int ColorName()
DECLARE_COLOR(TransferToLabelColor);
private:
struct ColorsRCData_t
{
int m_TransferToLabelColor;
};
static const ColorsRCData_t* s_pColors;
};
#endif // !defined __LAYOUT_HPP__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -