#pragma once

#include <Text.h>
#include <Drawing.h>

#include "NetworkAPIProcessor.h"

class UIMLProgressAndStateView : public Framework::Drawable,
                                 public NetworkAPIProcessor
{
public:
    class Style : public Framework::Drawable::Style
    {
    public:
        static const __int64 Vertical = 0x100;
        static const __int64 Reversed = 0x200;
    };

private:
    Framework::Text id;
    Framework::Image* background;
    Framework::Image* foreground;
    char registerMessage;
    char unregisterMessage;
    Framework::Text toolTipPrefix;
    Framework::Text toolTipSuffix;
    int* targetAddress;
    int addressLength;
    int max;
    int current;

public:
    UIMLProgressAndStateView(Framework::Text id,
        Framework::Text background,
        Framework::Text foreground,
        int* targetAddress,
        int addressLength,
        char registerMessage,
        char unregisterMessage,
        Framework::Text toolTipPrefix,
        Framework::Text toolTipSuffix);
    ~UIMLProgressAndStateView();
    void api(char* message) override;
    void render(Framework::Image& rObj) override;
};