
/*
 * See the files COPYING and README for copyright information and how to reach 
 * the author.
 *
 *  $Id: render.h,v 1.1.1.1 2004/11/19 16:45:31 lordjaxom Exp $
 */

#ifndef VDR_BURN_RENDER_H
#define VDR_BURN_RENDER_H

#include <stdlib.h>
#include <string.h>

#define X_DISPLAY_MISSING       // we don't want to be x-dependent
#include <Imlib2.h>

class cBurnJob;
class cBurnRecording;

class cBurnRender
{
  private:
    char *mBackground;
    char *mButton;
    char *mFontFace;
    int mFontSize;
    char *mFontPath;

    cBurnJob *mJob;
    cBurnRecording *mRecording;

  protected:
    void DrawImage(const char *Filename, int X, int Y);
    int DrawText(const char *Text, int X, int Y, int Width, int Height,
            int Align = 0, int First = 0);
    void DrawRectangle(int X, int Y, int Width, int Height, uint32_t Color);

    char *WrapText(const char *Text, int Width, int &LineHeight);

    bool CreateMenu(void);

    int CreateMainMenuPages(void);
    bool CreateMainMenuButtons(int Pages);
    int CreateTitleMenuPages(void);
    bool CreateTitleMenuButtons(int Pages);

  public:
    static void RenderProc(void *This);

    cBurnRender(void);
    ~cBurnRender();

    void SetBackground(const char *Filename);
    void SetButton(const char *Filename);
    void SetFont(const char *Face, int Size);
    void SetFontPath(const char *Path);

    void SetMainMenu(cBurnJob * Job) { mJob = Job; }
    void SetTitleMenu(cBurnRecording * Recording) { mRecording = Recording; }
};

#endif // VDR_BURN_RENDER_H
