#pragma once
#include "bkskin.h"
class bkstyle : public cbkobject
enum ;
colorref m_crbg;
colorref m_crbghover;
colorref m_crtext;
colorref m_crhovertext;
colorref m_crdisabledtext;
uint m_ualign;
int m_ntextalign;
hfont m_fttext;
hfont m_fthover;
int m_nmarginx;
int m_nmarginy;
int m_nspacing;
int m_nlinespacing;
lpctstr m_lpcursorname;
cstringa m_strskinname;
// get class name
lpcstr getname()
// get style object from pool by class name
static const bkstyle& getstyle(lpcstr lpszname)
static bool loaddefaultstyles(uint uresid)
static bool loadstyles(uint uresid)
static bool loadstyles(lpcstr lpszxml)
static size_t getcount()
protected:
typedef catlmap__stylepoolclass;
cstringa m_strclassname;
static __stylepoolclass* ms_pstylepool;
static __stylepoolclass* _getstylepool()
// static __stylepoolclass& _getstylepool()
//
// load style-pool from xml tree
static void _loadstylepool(tixmlelement *pxmlstylerootelem)
}bkwin_declare_attributes_begin()
bkwin_string_attribute("name", m_strclassname, true)
bkwin_string_attribute("skin", m_strskinname, true)
bkwin_hex_attribute("textmode", m_ntextalign, true)
bkwin_color_attribute("crbg", m_crbg, false)
bkwin_color_attribute("crbghover", m_crbghover, false)
bkwin_color_attribute("crtext", m_crtext, false)
bkwin_color_attribute("crhover", m_crhovertext, false)
bkwin_color_attribute("crdisabled", m_crdisabledtext, false)
bkwin_font_attribute("font", m_fttext, true)
bkwin_font_attribute("hoverfont", m_fthover, true)
bkwin_int_attribute("x-margin", m_nmarginx, true)
bkwin_int_attribute("y-margin", m_nmarginy, true)
bkwin_int_attribute("margin", m_nmarginx = m_nmarginy, true) // 這樣比較bt,不過.....湊合用吧
bkwin_int_attribute("spacing", m_nspacing, true)
bkwin_int_attribute("linespacing", m_nlinespacing, true)
bkwin_enum_attribute("cursor", lpctstr, false)
bkwin_enum_value("hand", idc_hand)
bkwin_enum_value("arrow", idc_arrow)
bkwin_enum_end(m_lpcursorname)
bkwin_declare_attributes_end()
};__declspec(selectany) bkstyle::__stylepoolclass* bkstyle::ms_pstylepool = null;
qml 介面開發之控制項樣式設定
使用qml開發應用程式,qml設計介面更加的快捷美觀,邏輯程式的實現使用 c 使用qml 怎樣設計出合適的介面,胸有成竹是關鍵,你心裡想的明確的,介面的實現便是調 了,怎樣實現心中的樣子,設計樣式根據什麼來設計,檢視qt的源 會有很多收穫,剛開始接觸qml開發有一頭霧水,慢慢做著,發現挺簡單的,其實...
Python 之lxml解析庫
一 xpath常用規則 二 解析html檔案 from lxml import etree 讀取html檔案進行解析 defparse html file html etree.parse test.html parser etree.htmlparser print etree.tostring ...
爬蟲之xpath解析庫
xpath語法 1.常用規則 1.nodename 節點名定位 2.從當前節點擊取子孫節點 3.從當前節點擊取直接子節點 4.nodename attribute 根據屬性定位標籤 div class ui main 5.attributename 獲取屬性 6.text 獲取文字 2.屬性匹配兩種...