Subversion Repositories tpanel

Rev

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

Rev 203 Rev 204
Line 40... Line 40...
40
    public:
40
    public:
41
        TSubPage(const std::string& name);
41
        TSubPage(const std::string& name);
42
        ~TSubPage();
42
        ~TSubPage();
43
 
43
 
44
        void setPalette(TPalette *pal) { mPalette = pal; }
44
        void setPalette(TPalette *pal) { mPalette = pal; }
45
//        void setFonts(TFont *ft) { mFonts = ft; }
-
 
46
 
45
 
47
        int getNumber() { return mSubpage.pageID; }
46
        int getNumber() { return mSubpage.pageID; }
48
        std::string& getName() { return mSubpage.name; }
47
        std::string& getName() { return mSubpage.name; }
49
        PAGE_T& getSubPage() { return mSubpage; }
48
        PAGE_T& getSubPage() { return mSubpage; }
50
        std::string& getGroupName() { return mSubpage.group; }
49
        std::string& getGroupName() { return mSubpage.group; }
Line 87... Line 86...
87
        void regCallPlayVideo(std::function<void (ulong handle, ulong parent, int left, int top, int width, int height, const std::string& url, const std::string& user, const std::string& pw)> playVideo) { _playVideo = playVideo; };
86
        void regCallPlayVideo(std::function<void (ulong handle, ulong parent, int left, int top, int width, int height, const std::string& url, const std::string& user, const std::string& pw)> playVideo) { _playVideo = playVideo; };
88
 
87
 
89
    protected:
88
    protected:
90
        void initialize();
89
        void initialize();
91
        void runTimer();
90
        void runTimer();
92
//        bool sortButtons();
-
 
93
#ifdef  _SCALE_SKIA_
91
#ifdef  _SCALE_SKIA_
94
        void calcPosition(int im_width, int im_height, int *left, int *top, bool scale = false);
92
        void calcPosition(int im_width, int im_height, int *left, int *top, bool scale = false);
95
#else
93
#else
96
        void calcPosition(int im_width, int im_height, int *left, int *top);
94
        void calcPosition(int im_width, int im_height, int *left, int *top);
97
#endif
95
#endif
Line 99... Line 97...
99
        std::function<void (ulong handle, unsigned char *image, size_t size, size_t rowBytes, int width, int height, ulong color)> _setBackground{nullptr};
97
        std::function<void (ulong handle, unsigned char *image, size_t size, size_t rowBytes, int width, int height, ulong color)> _setBackground{nullptr};
100
        std::function<void (ulong handle, ulong parent, unsigned char *buffer, int width, int height, int pixline, int left, int top)> _displayButton{nullptr};
98
        std::function<void (ulong handle, ulong parent, unsigned char *buffer, int width, int height, int pixline, int left, int top)> _displayButton{nullptr};
101
        std::function<void (ulong handle)> _callDropSubPage{nullptr};
99
        std::function<void (ulong handle)> _callDropSubPage{nullptr};
102
        std::function<void (ulong handle, ulong parent, int left, int top, int width, int height, const std::string& url, const std::string& user, const std::string& pw)> _playVideo{nullptr};
100
        std::function<void (ulong handle, ulong parent, int left, int top, int width, int height, const std::string& url, const std::string& user, const std::string& pw)> _playVideo{nullptr};
103
 
101
 
104
//        bool drawText(SkBitmap *img);
-
 
105
        int numberLines(const std::string& str);
-
 
106
        int calcLineHeight(std::string text, SkFont& font);
-
 
107
//        Button::POSITION_t calcImagePosition(int width, int height, Button::CENTER_CODE cc, int line);
-
 
108
        std::vector<std::string> getListContent(ulong handle, int ap, int ta, int ti, int rows, int columns);
-
 
109
        std::string getListRow(int ti, int row);
-
 
110
        void getGlobalSettings(Button::TButton* button);
-
 
111
        void registerListCallback(Button::TButton *button);
-
 
112
 
-
 
113
        bool mVisible{false};                   // TRUE = subpage is visible
102
        bool mVisible{false};                   // TRUE = subpage is visible
114
        std::string mFName;                     // The file name of the page
103
        std::string mFName;                     // The file name of the page
115
        std::string mFile;                      // The path and file name of the page
104
        std::string mFile;                      // The path and file name of the page
116
        TPalette *mPalette{nullptr};            // The color palette
105
        TPalette *mPalette{nullptr};            // The color palette
117
        PAGE_T mSubpage;                        // Parameters of the subpage
106
        PAGE_T mSubpage;                        // Parameters of the subpage
118
//        Button::BUTTONS_T *mButtons{nullptr};   // The elements of the subpage
-
 
119
//        TFont *mFonts{nullptr};                 // The font management
-
 
120
        int mZOrder{-1};                        // The Z-Order of the subpage if it is visible
107
        int mZOrder{-1};                        // The Z-Order of the subpage if it is visible
121
        std::atomic<bool>mTimerRunning{false};  // TRUE= timer is running
108
        std::atomic<bool>mTimerRunning{false};  // TRUE= timer is running
122
        std::thread mThreadTimer;               // The thread started if a timeout is defined.
109
        std::thread mThreadTimer;               // The thread started if a timeout is defined.
123
        std::vector<LIST_t> mLists;             // Lists of subpage
110
        std::vector<LIST_t> mLists;             // Lists of subpage
124
};
111
};