Subversion Repositories tpanel

Rev

Rev 298 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 298 Rev 306
Line 23... Line 23...
23
#include <vector>
23
#include <vector>
24
#include "tbutton.h"
24
#include "tbutton.h"
25
#include "tvalidatefile.h"
25
#include "tvalidatefile.h"
26
#include "tpalette.h"
26
#include "tpalette.h"
27
#include "tpageinterface.h"
27
#include "tpageinterface.h"
-
 
28
#include "tintborder.h"
28
 
29
 
29
class TBitmap;
30
class TBitmap;
30
 
31
 
31
typedef struct RECT_T
32
typedef struct RECT_T
32
{
33
{
Line 34... Line 35...
34
    int top{0};
35
    int top{0};
35
    int width{0};
36
    int width{0};
36
    int height{0};
37
    int height{0};
37
}RECT_T;
38
}RECT_T;
38
 
39
 
39
class TSubPage : public TValidateFile, public TPageInterface
40
class TSubPage : public TValidateFile, public TPageInterface, public Border::TIntBorder
40
{
41
{
41
    public:
42
    public:
42
        TSubPage(const std::string& name);
43
        TSubPage(const std::string& name);
43
        ~TSubPage();
44
        ~TSubPage();
44
 
45
 
Line 75... Line 76...
75
        void setHideTime(int t) { mSubpage.hideTime = t; }
76
        void setHideTime(int t) { mSubpage.hideTime = t; }
76
        int getTimeout() { return mSubpage.timeout; }
77
        int getTimeout() { return mSubpage.timeout; }
77
        void setTimeout(int t) { mSubpage.timeout = t; }
78
        void setTimeout(int t) { mSubpage.timeout = t; }
78
        bool isVisible() { return mVisible; }
79
        bool isVisible() { return mVisible; }
79
        ulong getHandle() { return ((mSubpage.pageID << 16) & 0xffff0000); }
80
        ulong getHandle() { return ((mSubpage.pageID << 16) & 0xffff0000); }
-
 
81
        ulong getParent() { return mParent; }
-
 
82
        void setParent(ulong handle) { mParent = handle; }
80
        std::string getFillColor() { return mSubpage.sr[0].cf; }
83
        std::string getFillColor() { return mSubpage.sr[0].cf; }
81
        std::string getTextColor() { return mSubpage.sr[0].ct; }
84
        std::string getTextColor() { return mSubpage.sr[0].ct; }
82
        SkBitmap& getBgImage();
85
        SkBitmap& getBgImage();
83
 
86
 
84
        void show();
87
        void show();
Line 116... Line 119...
116
        bool mVisible{false};                   // TRUE = subpage is visible
119
        bool mVisible{false};                   // TRUE = subpage is visible
117
        std::string mFName;                     // The file name of the page
120
        std::string mFName;                     // The file name of the page
118
        std::string mFile;                      // The path and file name of the page
121
        std::string mFile;                      // The path and file name of the page
119
        TPalette *mPalette{nullptr};            // The color palette
122
        TPalette *mPalette{nullptr};            // The color palette
120
        PAGE_T mSubpage;                        // Parameters of the subpage
123
        PAGE_T mSubpage;                        // Parameters of the subpage
-
 
124
        ulong mParent{0};                       // The handle of the parent page or view button
121
        int mZOrder{-1};                        // The Z-Order of the subpage if it is visible
125
        int mZOrder{-1};                        // The Z-Order of the subpage if it is visible
122
        SkBitmap mBgImage;                      // The background image (cache).
126
        SkBitmap mBgImage;                      // The background image (cache).
123
        std::atomic<bool>mTimerRunning{false};  // TRUE= timer is running
127
        std::atomic<bool>mTimerRunning{false};  // TRUE= timer is running
124
        std::thread mThreadTimer;               // The thread started if a timeout is defined.
128
        std::thread mThreadTimer;               // The thread started if a timeout is defined.
125
        std::vector<LIST_t> mLists;             // Lists of subpage
129
        std::vector<LIST_t> mLists;             // Lists of subpage