#pragma once
|
|
#include "win32/win.hpp"
|
#include "wobject/xcontrol.hpp"
|
#include "kobject/kimage.hpp"
|
|
using kimage = Hxsoft::XFrame::IXImage;
|
class ximage: public xcontrol
|
{
|
public:
|
ximage() :xcontrol(nullptr) {}
|
ximage(void* impl) :xcontrol(impl) {}
|
public:
|
kimage GetKImage(){
|
return (kimage*)getNativePointer();
|
}
|
public:
|
int GetWidth()
|
{
|
return GetKImage()->GetWidth();
|
}
|
int GetHeight()
|
{
|
return GetKImage()->GetHeight();
|
}
|
public:
|
LPCTSTR SetUrl(LPCTSTR pServer,LPCTSTR pUrl)
|
{
|
return GetKImage()->SetUrl(pServer,pUrl);
|
}
|
LPCTSTR GetUrl()
|
{
|
return GetKImage()->GetUrl();
|
}
|
LPCTSTR GetServerUrl()
|
{
|
return GetKImage()->GetServerUrl();
|
}
|
public:
|
bool SaveToFile()
|
{
|
return GetKImage()->SaveToFile();
|
}
|
bool SaveToFile(LPTSTR pFile)
|
{
|
return GetKImage()->SaveToFile(pFile);
|
}
|
bool SaveToFileEx(LPTSTR pFile)
|
{
|
return GetKImage()->SaveToFileEx(pFile);
|
}
|
bool LoadFromUrl(LPCTSTR pServerUrl,LPCTSTR pUrl)
|
{
|
return GetKImage()->LoadFromUrl(pServerUrl,pUrl);
|
}
|
};
|