xj qian
2024-06-27 e4b4c508c599943ddb22b7d4868ccd40ac05a043
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#include "kcontrol.hpp"
 
namespace Hxsoft{ namespace XFrame
    class xcSHtml
    {
    public:
        struct htBlock{};
    };
 
    class IXSHtmlItem
    {
    public:
        LPCTSTR GetUrl(xcSHtml::htBlock*  pBlock);
        LPCTSTR GetData(xcSHtml::htBlock* pBlock);
        LPCTSTR GetData(xcSHtml::htBlock* pBlock, int nRow, int nCol);
        int GetRowColumn(xcSHtml::htBlock* pBlock, int &Row, int &Col);
        int RenameID(xcSHtml::htBlock* pBlock,LPTSTR ID);
        int SetData(xcSHtml::htBlock* pBlock,LPTSTR strText);
 
        int SetStyle(xcSHtml::htBlock* pBlock,LPTSTR cssStyle);
        int SetStyleClass(xcSHtml::htBlock* pBlock,LPTSTR cssStyleClass);
 
        LPCTSTR GetText(xcSHtml::htBlock* pBlock);
        int SetText(xcSHtml::htBlock* pBlock,LPTSTR strText);
 
        LPCTSTR GetID(xcSHtml::htBlock* pBlock);
        int SetID(xcSHtml::htBlock* pBlock,LPTSTR newID);
    };
 
    class IXSHtml : public IXFControl
    {
    public:
        int SetContent(LPCTSTR pStr);
    public:
        //int DrawHtml(HDC hPaintDC,LPTSTR pHtml,RECT &rt);
    public:
        int SetElementVisible(LPTSTR ID, bool bVisible);
    public:
        bool IsVisible(LPTSTR ID);
        bool SwitchState(LPTSTR ID);
    public:
        xcSHtml::htBlock* FoundBlockByID(LPTSTR ID);
        xcSHtml::htBlock* FoundBlockByID(xcSHtml::htBlock* pBlock, LPTSTR ID);
    };
}}