#include "stdafx.h"

#include "WbPrinting.h"
#include "GrtTemplates.h"

namespace MySQL {
namespace GUI {
namespace Workbench {
namespace Plugins {


using namespace System;
using namespace System::Runtime::InteropServices;
using namespace System::Collections::Generic;
using namespace MySQL::Grt;


int Printing::getPageCount(MySQL::Grt::GrtValue ^view)
{
  return wbprint::getPageCount(model_DiagramRef::cast_from(grt::BaseListRef::cast_from(view->get_unmanaged_object()).get(0)));
}

int Printing::printPageHDC(MySQL::Grt::GrtValue ^view, int page, IntPtr ^hdc, int width, int height)
{
  return wbprint::printNative(model_DiagramRef::cast_from(grt::BaseListRef::cast_from(view->get_unmanaged_object()).get(0)),
    page, (HDC)hdc->ToPointer(), width, height);
}


} // namespace MySQL
} // namespace GUI
} // namespace Workbench
} // namespace Plugins

