Subversion Repositories tpanel

Rev

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

Rev 163 Rev 165
Line 884... Line 884...
884
            void funcResource(const RESOURCE_T *resource, const std::string& url, BITMAP_CACHE bc, int instance);
884
            void funcResource(const RESOURCE_T *resource, const std::string& url, BITMAP_CACHE bc, int instance);
885
            void funcBattery(int level, bool charging, int chargeType);
885
            void funcBattery(int level, bool charging, int chargeType);
886
            void funcNetworkState(int level);
886
            void funcNetworkState(int level);
887
 
887
 
888
        private:
888
        private:
889
            typedef struct IMAGE_t
889
/*            typedef struct IMAGE_t
890
            {
890
            {
891
                int number{0};
891
                int number{0};
892
                SkBitmap imageMi;
892
                SkBitmap imageMi;
893
                SkBitmap imageBm;
893
                SkBitmap imageBm;
894
 
894
 
Line 897... Line 897...
897
                    number = 0;
897
                    number = 0;
898
                    imageMi.reset();
898
                    imageMi.reset();
899
                    imageBm.reset();
899
                    imageBm.reset();
900
                }
900
                }
901
            }IMAGE_t;
901
            }IMAGE_t;
902
 
902
*/
903
            std::function<void (ulong handle, ulong parent, unsigned char *buffer, int width, int height, int pixline, int left, int top)> _displayButton{nullptr};
903
            std::function<void (ulong handle, ulong parent, unsigned char *buffer, int width, int height, int pixline, int left, int top)> _displayButton{nullptr};
904
            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};
904
            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};
905
 
905
 
906
            POSITION_t calcImagePosition(int width, int height, CENTER_CODE cc, int number, int line = 0);
906
            POSITION_t calcImagePosition(int width, int height, CENTER_CODE cc, int number, int line = 0);
907
            IMAGE_SIZE_t calcImageSize(int imWidth, int imHeight, int instance, bool aspect=false);
907
            IMAGE_SIZE_t calcImageSize(int imWidth, int imHeight, int instance, bool aspect=false);
Line 1004... Line 1004...
1004
            std::vector<PUSH_FUNC_T> pushFunc;  // Push functions: This are executed on button press
1004
            std::vector<PUSH_FUNC_T> pushFunc;  // Push functions: This are executed on button press
1005
            std::vector<SR_T> sr;   // The elements the button consists of
1005
            std::vector<SR_T> sr;   // The elements the button consists of
1006
 
1006
 
1007
            TPalette *mPalette{nullptr}; // The color palette
1007
            TPalette *mPalette{nullptr}; // The color palette
1008
            // Image management
1008
            // Image management
1009
            std::map<int, IMAGE_t> mImages; // Contains the images in ready to use format, if there any
1009
//            std::map<int, IMAGE_t> mImages; // Contains the images in ready to use format, if there any
1010
            SkBitmap mLastImage;    // The last calculated image
1010
            SkBitmap mLastImage;    // The last calculated image
1011
            ulong mHandle{0};       // internal used handle to identify button
1011
            ulong mHandle{0};       // internal used handle to identify button
1012
            int mParentHeight{0};   // The height of the parent page / subpage
1012
            int mParentHeight{0};   // The height of the parent page / subpage
1013
            int mParentWidth{0};    // The width of the parent page / subpage
1013
            int mParentWidth{0};    // The width of the parent page / subpage
1014
            bool mEnabled{true};    // By default a button is enabled (TRUE); FALSE = Button disabled
1014
            bool mEnabled{true};    // By default a button is enabled (TRUE); FALSE = Button disabled