reorganizing repo

git-svn-id: svn://ultimatepp.org/upp/trunk@9207 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-11-22 11:24:16 +00:00
parent e3e8d627f5
commit e29f8e4718
265 changed files with 0 additions and 69272 deletions

View file

@ -1,44 +0,0 @@
class ViewDraw : public SystemDraw {
public:
ViewDraw(Ctrl *ctrl);
~ViewDraw();
};
Vector<WString>& coreCmdLine__();
Vector<WString> SplitCmdLine__(const char *cmd);
#ifdef PLATFORM_WIN32
#define GUI_APP_MAIN \
void GuiMainFn_();\
\
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int nCmdShow) \
{ \
UPP::coreCmdLine__() = UPP::SplitCmdLine__(UPP::FromSystemCharset(lpCmdLine)); \
UPP::AppInitEnvironment__(); \
GuiMainFn_(); \
UPP::Ctrl::CloseTopCtrls(); \
return UPP::GetExitCode(); \
} \
\
void GuiMainFn_()
#endif
#ifdef PLATFORM_POSIX
#define GUI_APP_MAIN \
void GuiMainFn_(); \
\
int main(int argc, const char **argv, const char **envptr) { \
UPP::AppInit__(argc, argv, envptr); \
GuiMainFn_(); \
UPP::Ctrl::CloseTopCtrls(); \
UPP::AppExit__(); \
return UPP::GetExitCode(); \
} \
\
void GuiMainFn_()
#endif
class DHCtrl : Ctrl {};

View file

@ -1,16 +0,0 @@
#include <CtrlLib/CtrlLib.h>
#ifdef GUI_SKELETON
NAMESPACE_UPP
void ChSysInit()
{
CtrlImg::Reset();
CtrlsImg::Reset();
ChReset();
}
END_UPP_NAMESPACE
#endif

View file

@ -1,241 +0,0 @@
#include <CtrlCore/CtrlCore.h>
#include <plugin/bmp/bmp.h>
#ifdef GUI_SKELETON
NAMESPACE_UPP
#define LLOG(x) // LOG(x)
void ClearClipboard()
{
GuiLock __;
}
void AppendClipboard(int format, const byte *data, int length)
{
GuiLock __;
}
void AppendClipboard(const char *format, const byte *data, int length)
{
GuiLock __;
}
void AppendClipboard(const char *format, const String& data)
{
GuiLock __;
AppendClipboard(format, data, data.GetLength());
}
void AppendClipboard(const char *format, const Value& data, String (*render)(const Value&))
{
GuiLock __;
}
String ReadClipboard(const char *format)
{
GuiLock __;
return Null;
}
void AppendClipboardText(const String& s)
{
AppendClipboard("text", ToSystemCharset(s));
}
void AppendClipboardUnicodeText(const WString& s)
{
AppendClipboard("wtext", (byte *)~s, 2 * s.GetLength());
}
const char *ClipFmtsText()
{
return "wtext;text";
}
String GetString(PasteClip& clip)
{
GuiLock __;
if(clip.Accept("wtext")) {
String s = ~clip;
return WString((const wchar *)~s, wstrlen((const wchar *)~s)).ToString();
}
if(clip.IsAvailable("text"))
return ~clip;
return Null;
}
WString GetWString(PasteClip& clip)
{
GuiLock __;
if(clip.Accept("wtext")) {
String s = ~clip;
return WString((const wchar *)~s, wstrlen((const wchar *)~s));
}
if(clip.IsAvailable("text"))
return (~clip).ToWString();
return Null;
}
bool AcceptText(PasteClip& clip)
{
return clip.Accept(ClipFmtsText());
}
static String sText(const Value& data)
{
return data;
}
static String sWText(const Value& data)
{
return Unicode__(WString(data));
}
void Append(VectorMap<String, ClipData>& data, const String& text)
{
data.GetAdd("text", ClipData(text, sText));
data.GetAdd("wtext", ClipData(text, sWText));
}
void Append(VectorMap<String, ClipData>& data, const WString& text)
{
data.GetAdd("text", ClipData(text, sText));
data.GetAdd("wtext", ClipData(text, sWText));
}
String GetTextClip(const WString& text, const String& fmt)
{
if(fmt == "text")
return text.ToString();
if(fmt == "wtext")
return Unicode__(text);
return Null;
}
String GetTextClip(const String& text, const String& fmt)
{
if(fmt == "text")
return text;
if(fmt == "wtext")
return Unicode__(text.ToWString());
return Null;
}
String ReadClipboardText()
{
return ReadClipboardUnicodeText().ToString();
}
WString ReadClipboardUnicodeText()
{
return Null;
}
bool IsClipboardAvailable(const char *id)
{
return false;
}
bool IsClipboardAvailableText()
{
return false;
}
const char *ClipFmtsImage()
{
static const char *q;
ONCELOCK {
static String s = "dib;" + ClipFmt<Image>();
q = s;
}
return q;
}
bool AcceptImage(PasteClip& clip)
{
GuiLock __;
return clip.Accept(ClipFmtsImage());
}
Image GetImage(PasteClip& clip)
{
GuiLock __;
Image m;
if(Accept<Image>(clip)) {
LoadFromString(m, ~clip);
if(!m.IsEmpty())
return m;
}
return Null;
}
Image ReadClipboardImage()
{
GuiLock __;
PasteClip d = Ctrl::Clipboard();
return GetImage(d);
}
String sImage(const Value& image)
{
Image img = image;
return StoreAsString(const_cast<Image&>(img));
}
String GetImageClip(const Image& img, const String& fmt)
{
GuiLock __;
if(img.IsEmpty()) return Null;
if(fmt == ClipFmt<Image>())
return sImage(img);
return Null;
}
void AppendClipboardImage(const Image& img)
{
GuiLock __;
if(img.IsEmpty()) return;
AppendClipboard(ClipFmt<Image>(), img, sImage);
}
bool AcceptFiles(PasteClip& clip)
{
if(clip.Accept("files")) {
clip.SetAction(DND_COPY);
return true;
}
return false;
}
bool IsAvailableFiles(PasteClip& clip)
{
return clip.IsAvailable("files");
}
Vector<String> GetFiles(PasteClip& clip)
{
GuiLock __;
Vector<String> f;
return f;
}
bool PasteClip::IsAvailable(const char *fmt) const
{
return false;
}
String PasteClip::Get(const char *fmt) const
{
return Null;
}
void PasteClip::GuiPlatformConstruct()
{
}
END_UPP_NAMESPACE
#endif

View file

@ -1,111 +0,0 @@
#include <CtrlCore/CtrlCore.h>
#ifdef GUI_SKELETON
#define LLOG(x) // DLOG(x)
NAMESPACE_UPP
void ChHostSkin(void)
{
}
void WakeUpGuiThread(void)
{
}
void Ctrl::GuiPlatformConstruct()
{
}
void Ctrl::GuiPlatformDestruct()
{
}
void Ctrl::GuiPlatformRemove()
{
}
void Ctrl::GuiPlatformGetTopRect(Rect& r) const
{
}
bool Ctrl::GuiPlatformRefreshFrameSpecial(const Rect& r)
{
return false;
}
bool Ctrl::GuiPlatformSetFullRefreshSpecial()
{
return false;
}
void Ctrl::PaintCaret(SystemDraw& w)
{
}
String GuiPlatformGetKeyDesc(dword key)
{
return Null;
}
void Ctrl::GuiPlatformSelection(PasteClip&)
{
}
void GuiPlatformAdjustDragImage(ImageBuffer&)
{
}
bool GuiPlatformHasSizeGrip()
{
return true;
}
void GuiPlatformGripResize(TopWindow *q)
{
}
Color GuiPlatformGetScreenPixel(int x, int y)
{
return Black;
}
void GuiPlatformAfterMenuPopUp()
{
}
void Ctrl::SetCaret(int x, int y, int cx, int cy)
{
GuiLock __;
caretx = x;
carety = y;
caretcx = cx;
caretcy = cy;
SyncCaret();
}
void Ctrl::SyncCaret() {
GuiLock __;
}
String Ctrl::Name() const {
GuiLock __;
#ifdef CPU_64
String s = String(typeid(*this).name()) + " : 0x" + FormatIntHex(this);
#else
String s = String(typeid(*this).name()) + " : " + Format("0x%x", (int) this);
#endif
if(IsChild())
s << "(parent " << String(typeid(*parent).name()) << ")";
return s;
}
void Ctrl::InstallPanicBox()
{
}
END_UPP_NAMESPACE
#endif

View file

@ -1,5 +0,0 @@
//$ class Ctrl {
public:
static void EndSession() {}
static bool IsEndSession() { return false; }
//$ };

View file

@ -1,40 +0,0 @@
#include <CtrlCore/CtrlCore.h>
#ifdef GUI_SKELETON
NAMESPACE_UPP
#define LLOG(x) // LOG(x)
// --------------------------------------------------------------------------------------------
Ptr<Ctrl> sDnDSource;
Ctrl * Ctrl::GetDragAndDropSource()
{
return sDnDSource;
}
Image MakeDragImage(const Image& arrow, Image sample);
Image MakeDragImage(const Image& arrow, const Image& arrow98, Image sample)
{
#ifdef PLATFORM_WIN32
if(IsWin2K())
return MakeDragImage(arrow, sample);
else
#endif
return arrow98;
}
int Ctrl::DoDragAndDrop(const char *fmts, const Image& sample, dword actions,
const VectorMap<String, ClipData>& data)
{
return DND_NONE;
}
void Ctrl::SetSelectionSource(const char *fmts) {}
END_UPP_NAMESPACE
#endif

View file

@ -1,62 +0,0 @@
#include <CtrlCore/CtrlCore.h>
#ifdef GUI_SKELETON
NAMESPACE_UPP
#define LLOG(x) // LOG(x)
#define LTIMING(x) // RTIMING(x)
/*Rect SystemDraw::GetVirtualScreenArea()
{
GuiLock __;
}*/
dword SystemDraw::GetInfo() const
{
return NATIVE;
}
Size SystemDraw::GetPageSize() const
{
return Size(0, 0);
}
Size SystemDraw::GetNativeDpi() const
{
return Size(96, 96);
}
void SystemDraw::BeginNative()
{
}
void SystemDraw::EndNative()
{
}
int SystemDraw::GetCloffLevel() const
{
return 0;
}
SystemDraw::~SystemDraw() {
GuiLock __;
}
void BackDraw::Destroy()
{
GuiLock __;
}
void BackDraw::Create(SystemDraw& w, int cx, int cy) {
GuiLock __;
}
void BackDraw::Put(SystemDraw& w, int x, int y) {
GuiLock __;
}
END_UPP_NAMESPACE
#endif

View file

@ -1,104 +0,0 @@
#include <CtrlCore/CtrlCore.h>
#ifdef GUI_SKELETON
NAMESPACE_UPP
#define LLOG(x) // LOG(x)
#define LTIMING(x) // RTIMING(x)
void SystemDraw::BeginOp()
{
LTIMING("Begin");
GuiLock __;
}
void SystemDraw::OffsetOp(Point p)
{
GuiLock __;
}
bool SystemDraw::ClipOp(const Rect& r)
{
GuiLock __;
return true;
}
bool SystemDraw::ClipoffOp(const Rect& r)
{
GuiLock __;
return true;
}
void SystemDraw::EndOp()
{
GuiLock __;
}
bool SystemDraw::ExcludeClipOp(const Rect& r)
{
GuiLock __;
return true;
}
bool SystemDraw::IntersectClipOp(const Rect& r)
{
GuiLock __;
return true;
}
bool SystemDraw::IsPaintingOp(const Rect& r) const
{
GuiLock __;
return true;
}
Rect SystemDraw::GetPaintRect() const
{
GuiLock __;
return Rect(0, 0, 10000, 1000);
}
void SystemDraw::DrawRectOp(int x, int y, int cx, int cy, Color color)
{
GuiLock __;
}
void SystemDraw::DrawLineOp(int x1, int y1, int x2, int y2, int width, Color color)
{
GuiLock __;
}
void SystemDraw::SysDrawImageOp(int x, int y, const Image& img, const Rect& src, Color color)
{
GuiLock __;
}
void SystemDraw::DrawPolyPolylineOp(const Point *vertices, int vertex_count,
const int *counts, int count_count,
int width, Color color, Color doxor)
{
GuiLock __;
}
void SystemDraw::DrawPolyPolyPolygonOp(const Point *vertices, int vertex_count,
const int *subpolygon_counts, int subpolygon_count_count,
const int *disjunct_polygon_counts, int disjunct_polygon_count_count,
Color color, int width, Color outline, uint64 pattern, Color doxor)
{
GuiLock __;
}
void SystemDraw::DrawArcOp(const Rect& rc, Point start, Point end, int width, Color color)
{
GuiLock __;
}
void SystemDraw::DrawEllipseOp(const Rect& r, Color color, int width, Color pencolor)
{
GuiLock __;
}
END_UPP_NAMESPACE
#endif

View file

@ -1,16 +0,0 @@
#include <CtrlCore/CtrlCore.h>
#ifdef GUI_SKELETON
NAMESPACE_UPP
#define LLOG(x)
void SystemDraw::DrawTextOp(int x, int y, int angle, const wchar *text, Font font, Color ink,
int n, const int *dx) {
Std(font);
}
END_UPP_NAMESPACE
#endif

View file

@ -1,71 +0,0 @@
#include <CtrlCore/CtrlCore.h>
#ifdef GUI_SKELETON
//#include <shellapi.h>
NAMESPACE_UPP
#define LTIMING(x) // RTIMING(x)
void SetSurface(SystemDraw& w, int x, int y, int cx, int cy, const RGBA *pixels)
{
GuiLock __;
}
void SetSurface(SystemDraw& w, const Rect& dest, const RGBA *pixels, Size psz, Point poff)
{
GuiLock __;
}
ImageDraw::operator Image() const
{
return Image();
}
Image ImageDraw::GetStraight() const
{
return Image();
}
Draw& ImageDraw::Alpha()
{
if(!has_alpha) {
alpha.DrawRect(size, GrayColor(0));
has_alpha = true;
}
return alpha;
}
ImageDraw::ImageDraw(Size sz)
{
}
ImageDraw::ImageDraw(int cx, int cy)
{
}
ImageDraw::~ImageDraw()
{
}
Image Image::Arrow() { return Null; }
Image Image::Hand() { return Null; }
Image Image::Wait() { return Null; }
Image Image::IBeam() { return Null; }
Image Image::No() { return Null; }
Image Image::SizeAll() { return Null; }
Image Image::SizeHorz() { return Null; }
Image Image::SizeVert() { return Null; }
Image Image::SizeTopLeft() { return Null; }
Image Image::SizeTop() { return Null; }
Image Image::SizeTopRight() { return Null; }
Image Image::SizeLeft() { return Null; }
Image Image::SizeRight() { return Null; }
Image Image::SizeBottomLeft() { return Null; }
Image Image::SizeBottom() { return Null; }
Image Image::SizeBottomRight() { return Null; }
END_UPP_NAMESPACE
#endif

View file

@ -1,121 +0,0 @@
K_BACK = 53000,
K_BACKSPACE,
K_TAB,
K_SPACE,
K_RETURN,
K_ENTER,
K_SHIFT_KEY,
K_CTRL_KEY,
K_ALT_KEY,
K_CAPSLOCK,
K_ESCAPE,
K_PRIOR,
K_PAGEUP,
K_NEXT,
K_PAGEDOWN,
K_END,
K_HOME,
K_LEFT,
K_UP,
K_RIGHT,
K_DOWN,
K_INSERT,
K_DELETE,
K_NUMPAD0,
K_NUMPAD1,
K_NUMPAD2,
K_NUMPAD3,
K_NUMPAD4,
K_NUMPAD5,
K_NUMPAD6,
K_NUMPAD7,
K_NUMPAD8,
K_NUMPAD9,
K_MULTIPLY,
K_ADD,
K_SEPARATOR,
K_SUBTRACT,
K_DECIMAL,
K_DIVIDE,
K_SCROLL,
K_F1,
K_F2,
K_F3,
K_F4,
K_F5,
K_F6,
K_F7,
K_F8,
K_F9,
K_F10,
K_F11,
K_F12,
K_A,
K_B,
K_C,
K_D,
K_E,
K_F,
K_G,
K_H,
K_I,
K_J,
K_K,
K_L,
K_M,
K_N,
K_O,
K_P,
K_Q,
K_R,
K_S,
K_T,
K_U,
K_V,
K_W,
K_X,
K_Y,
K_Z,
K_0,
K_1,
K_2,
K_3,
K_4,
K_5,
K_6,
K_7,
K_8,
K_9,
K_CTRL_LBRACKET,
K_CTRL_RBRACKET,
K_CTRL_MINUS,
K_CTRL_GRAVE,
K_CTRL_SLASH,
K_CTRL_BACKSLASH,
K_CTRL_COMMA,
K_CTRL_PERIOD,
K_CTRL_SEMICOLON,
K_CTRL_EQUAL,
K_CTRL_APOSTROPHE,
K_BREAK,
K_PLUS = 0, // not yet defined
K_MINUS = 0, // not yet defined
K_COMMA = 0, // not yet defined
K_PERIOD = 0, // not yet defined
K_SEMICOLON = 0, // not yet defined
K_SLASH = 0, // not yet defined
K_GRAVE = 0, // not yet defined
K_LBRACKET = 0, // not yet defined
K_BACKSLASH = 0, // not yet defined
K_RBRACKET = 0, // not yet defined
K_QUOTEDBL = 0, // not yet defined

View file

@ -1,126 +0,0 @@
#pragma BLITZ_APPROVE
x_MSG(WM_CREATE)
x_MSG(WM_DESTROY)
x_MSG(WM_MOVE)
x_MSG(WM_SIZE)
x_MSG(WM_ACTIVATE)
x_MSG(WM_SETFOCUS)
x_MSG(WM_KILLFOCUS)
x_MSG(WM_ENABLE)
x_MSG(WM_SETREDRAW)
x_MSG(WM_SETTEXT)
x_MSG(WM_GETTEXT)
x_MSG(WM_GETTEXTLENGTH)
x_MSG(WM_PAINT)
x_MSG(WM_CLOSE)
x_MSG(WM_QUIT)
x_MSG(WM_ERASEBKGND)
x_MSG(WM_SYSCOLORCHANGE)
x_MSG(WM_SHOWWINDOW)
x_MSG(WM_WININICHANGE)
x_MSG(WM_FONTCHANGE)
x_MSG(WM_NEXTDLGCTL)
x_MSG(WM_DRAWITEM)
x_MSG(WM_MEASUREITEM)
x_MSG(WM_DELETEITEM)
x_MSG(WM_VKEYTOITEM)
x_MSG(WM_CHARTOITEM)
x_MSG(WM_SETFONT)
x_MSG(WM_GETFONT)
x_MSG(WM_QUERYDRAGICON)
x_MSG(WM_COMPAREITEM)
x_MSG(WM_GETDLGCODE)
x_MSG(WM_KEYDOWN)
x_MSG(WM_KEYUP)
x_MSG(WM_CHAR)
x_MSG(WM_DEADCHAR)
x_MSG(WM_SYSKEYDOWN)
x_MSG(WM_SYSKEYUP)
x_MSG(WM_SYSCHAR)
x_MSG(WM_SYSDEADCHAR)
x_MSG(WM_KEYLAST)
x_MSG(WM_INITDIALOG)
x_MSG(WM_COMMAND)
x_MSG(WM_SYSCOMMAND)
x_MSG(WM_TIMER)
x_MSG(WM_HSCROLL)
x_MSG(WM_VSCROLL)
x_MSG(WM_INITMENUPOPUP)
x_MSG(WM_MENUCHAR)
x_MSG(WM_LBUTTONDOWN)
x_MSG(WM_LBUTTONUP)
x_MSG(WM_LBUTTONDBLCLK)
x_MSG(WM_RBUTTONDOWN)
x_MSG(WM_RBUTTONUP)
x_MSG(WM_RBUTTONDBLCLK)
x_MSG(WM_MBUTTONDOWN)
x_MSG(WM_MBUTTONUP)
x_MSG(WM_MBUTTONDBLCLK)
x_MSG(WM_MOUSEMOVE)
x_MSG(WM_CUT)
x_MSG(WM_COPY)
x_MSG(WM_PASTE)
x_MSG(WM_CLEAR)
x_MSG(WM_UNDO)
x_MSG(WM_RENDERFORMAT)
x_MSG(WM_RENDERALLFORMATS)
x_MSG(WM_DESTROYCLIPBOARD)
x_MSG(WM_QUERYNEWPALETTE)
x_MSG(WM_PALETTECHANGED)
x_MSG(WM_WINDOWPOSCHANGED)
#ifndef PLATFORM_WINCE
x_MSG(WM_QUERYENDSESSION)
x_MSG(WM_ENDSESSION)
x_MSG(WM_QUERYOPEN)
x_MSG(WM_DEVMODECHANGE)
x_MSG(WM_ACTIVATEAPP)
x_MSG(WM_TIMECHANGE)
x_MSG(WM_MOUSEACTIVATE)
x_MSG(WM_CHILDACTIVATE)
x_MSG(WM_QUEUESYNC)
x_MSG(WM_GETMINMAXINFO)
x_MSG(WM_ICONERASEBKGND)
x_MSG(WM_SPOOLERSTATUS)
x_MSG(WM_COMPACTING)
x_MSG(WM_NCLBUTTONDOWN)
x_MSG(WM_NCLBUTTONUP)
x_MSG(WM_NCLBUTTONDBLCLK)
x_MSG(WM_NCRBUTTONDOWN)
x_MSG(WM_NCRBUTTONUP)
x_MSG(WM_NCRBUTTONDBLCLK)
x_MSG(WM_NCMBUTTONDOWN)
x_MSG(WM_NCMBUTTONUP)
x_MSG(WM_NCMBUTTONDBLCLK)
x_MSG(WM_NCCREATE)
x_MSG(WM_NCDESTROY)
x_MSG(WM_NCCALCSIZE)
x_MSG(WM_NCPAINT)
x_MSG(WM_NCACTIVATE)
x_MSG(WM_INITMENU)
x_MSG(WM_MENUSELECT)
x_MSG(WM_PARENTNOTIFY)
x_MSG(WM_MDICREATE)
x_MSG(WM_MDIDESTROY)
x_MSG(WM_MDIACTIVATE)
x_MSG(WM_MDIRESTORE)
x_MSG(WM_MDINEXT)
x_MSG(WM_MDIMAXIMIZE)
x_MSG(WM_MDITILE)
x_MSG(WM_MDICASCADE)
x_MSG(WM_MDIICONARRANGE)
x_MSG(WM_MDIGETACTIVE)
x_MSG(WM_MDISETMENU)
x_MSG(WM_DRAWCLIPBOARD)
x_MSG(WM_PAINTCLIPBOARD)
x_MSG(WM_VSCROLLCLIPBOARD)
x_MSG(WM_SIZECLIPBOARD)
x_MSG(WM_ASKCBFORMATNAME)
x_MSG(WM_CHANGECBCHAIN)
x_MSG(WM_HSCROLLCLIPBOARD)
x_MSG(WM_PALETTEISCHANGING)
x_MSG(WM_DROPFILES)
x_MSG(WM_POWER)
x_MSG(WM_WINDOWPOSCHANGING)
#endif

View file

@ -1,24 +0,0 @@
#include <CtrlCore/CtrlCore.h>
#ifdef GUI_SKELETON
//#include <winnls.h>
//#include "imm.h"
NAMESPACE_UPP
#define LLOG(x) // LOG(x)
bool GetShift() { return false; }
bool GetCtrl() { return false; }
bool GetAlt() { return false; }
bool GetCapsLock() { return false; }
bool GetMouseLeft() { return false; }
bool GetMouseRight() { return false; }
bool GetMouseMiddle() { return false; }
Point GetMousePos() { return Point(0, 0); }
END_UPP_NAMESPACE
#endif

View file

@ -1,133 +0,0 @@
#define GUI_SKELETON
NAMESPACE_UPP
class SystemDraw : public Draw {
public:
virtual dword GetInfo() const;
virtual Size GetPageSize() const;
virtual void BeginOp();
virtual void EndOp();
virtual void OffsetOp(Point p);
virtual bool ClipOp(const Rect& r);
virtual bool ClipoffOp(const Rect& r);
virtual bool ExcludeClipOp(const Rect& r);
virtual bool IntersectClipOp(const Rect& r);
virtual bool IsPaintingOp(const Rect& r) const;
virtual Rect GetPaintRect() const;
virtual void DrawRectOp(int x, int y, int cx, int cy, Color color);
virtual void SysDrawImageOp(int x, int y, const Image& img, const Rect& src, Color color);
virtual void DrawLineOp(int x1, int y1, int x2, int y2, int width, Color color);
virtual void DrawPolyPolylineOp(const Point *vertices, int vertex_count,
const int *counts, int count_count,
int width, Color color, Color doxor);
virtual void DrawPolyPolyPolygonOp(const Point *vertices, int vertex_count,
const int *subpolygon_counts, int scc,
const int *disjunct_polygon_counts, int dpcc,
Color color, int width, Color outline,
uint64 pattern, Color doxor);
virtual void DrawArcOp(const Rect& rc, Point start, Point end, int width, Color color);
virtual void DrawEllipseOp(const Rect& r, Color color, int pen, Color pencolor);
virtual void DrawTextOp(int x, int y, int angle, const wchar *text, Font font,
Color ink, int n, const int *dx);
virtual Size GetNativeDpi() const;
virtual void BeginNative();
virtual void EndNative();
virtual int GetCloffLevel() const;
virtual ~SystemDraw();
Point GetOffset() const { return Point(0, 0); }
bool CanSetSurface() { return false; }
static void Flush() {}
};
class BackDraw : public SystemDraw {
Size size;
Draw *painting;
Point painting_offset;
public:
virtual bool IsPaintingOp(const Rect& r) const;
public:
void Put(SystemDraw& w, int x, int y);
void Put(SystemDraw& w, Point p) { Put(w, p.x, p.y); }
void Create(SystemDraw& w, int cx, int cy);
void Create(SystemDraw& w, Size sz) { Create(w, sz.cx, sz.cy); }
void Destroy();
void SetPaintingDraw(Draw& w, Point off) { painting = &w; painting_offset = off; }
BackDraw();
~BackDraw();
};
class ImageDraw : public SystemDraw {
SystemDraw alpha;
bool has_alpha;
Size size;
public:
Draw& Alpha();
operator Image() const;
Image GetStraight() const;
ImageDraw(Size sz);
ImageDraw(int cx, int cy);
~ImageDraw();
};
void DrawDragRect(SystemDraw& w, const Rect& rect1, const Rect& rect2, const Rect& clip, int n,
Color color, uint64 pattern);
#ifndef PLATFORM_WIN32
#include <CtrlCore/stdids.h>
#endif
#define GUIPLATFORM_KEYCODES_INCLUDE <Skeleton/Keys.h>
#define GUIPLATFORM_CTRL_TOP_DECLS
#define GUIPLATFORM_CTRL_DECLS_INCLUDE <Skeleton/Ctrl.h>
#define GUIPLATFORM_PASTECLIP_DECLS
#define GUIPLATFORM_TOPWINDOW_DECLS_INCLUDE <Skeleton/Top.h>
class PrinterJob {
NilDraw nil;
Vector<int> pages;
public:
Draw& GetDraw() { return nil; }
operator Draw&() { return GetDraw(); }
const Vector<int>& GetPages() const { return pages; }
int operator[](int i) const { return 0; }
int GetPageCount() const { return 0; }
bool Execute() { return false; }
PrinterJob& Landscape(bool b = true) { return *this; }
PrinterJob& MinMaxPage(int minpage, int maxpage) { return *this; }
PrinterJob& PageCount(int n) { return *this; }
PrinterJob& CurrentPage(int currentpage) { return *this; }
PrinterJob& Name(const char *_name) { return *this; }
PrinterJob(const char *name = NULL) {}
~PrinterJob() {}
};
END_UPP_NAMESPACE
#define GUIPLATFORM_INCLUDE_AFTER <Skeleton/After.h>

View file

@ -1,22 +0,0 @@
description "Skeleton rainbow code\377";
file
Skeleton.h,
After.h,
Keys.h,
DrawOp.cpp,
DrawText.cpp,
Draw.cpp,
Image.cpp,
Util.cpp,
Ctrl.h,
Ctrl.cpp,
Wnd.cpp,
Proc.cpp,
Top.h,
Top.cpp,
Clip.cpp,
DnD.cpp,
ChSysInit.cpp,
Msg.i;

View file

@ -1,81 +0,0 @@
#include <CtrlCore/CtrlCore.h>
#ifdef GUI_SKELETON
NAMESPACE_UPP
#define LLOG(x) // LOG(x)
void TopWindow::SyncSizeHints() {}
void TopWindow::SyncTitle()
{
GuiLock __;
}
void TopWindow::SyncCaption()
{
GuiLock __;
}
void TopWindow::Open(Ctrl *owner)
{
GuiLock __;
}
void TopWindow::Open()
{
}
void TopWindow::OpenMain()
{
}
void TopWindow::Minimize(bool effect)
{
state = MINIMIZED;
}
TopWindow& TopWindow::FullScreen(bool b)
{
return *this;
}
void TopWindow::Maximize(bool effect)
{
state = MAXIMIZED;
}
void TopWindow::Overlap(bool effect)
{
GuiLock __;
state = OVERLAPPED;
}
TopWindow& TopWindow::TopMost(bool b, bool stay_top)
{
GuiLock __;
return *this;
}
bool TopWindow::IsTopMost() const
{
return true;
}
void TopWindow::GuiPlatformConstruct()
{
}
void TopWindow::GuiPlatformDestruct()
{
}
void TopWindow::SerializePlacement(Stream& s, bool reminimize)
{
GuiLock __;
}
END_UPP_NAMESPACE
#endif

View file

@ -1,3 +0,0 @@
//$ class TopWindow {
//$ };

View file

@ -1,40 +0,0 @@
#include <CtrlCore/CtrlCore.h>
#ifdef GUI_SKELETON
NAMESPACE_UPP
void DrawDragRect(SystemDraw& w, const Rect& rect1, const Rect& rect2, const Rect& clip, int n, Color color, uint64 pattern)
{
}
/*
Size GetScreenSize()
{
return ScreenInfo().GetPageSize();
}
*/
static uint64 sGetAniPat(uint64 src, int pos)
{
uint64 out = 0;
pos &= 7;
for(int i = 8; --i >= 0;) {
byte sr = (byte)(src >> (8 * ((7 - i - pos) & 7)));
out = (out << 8) | (byte)((sr | (sr << 8)) >> pos);
}
return out;
}
void DrawDragRect(Ctrl& q, const Rect& rect1, const Rect& rect2, const Rect& clip, int n,
Color color, int type, int animation)
{
ViewDraw w(&q);
uint64 pattern = type == DRAWDRAGRECT_DASHED ? I64(0xf0783c1e0f87c3e1) :
type == DRAWDRAGRECT_NORMAL ? I64(0x55aa55aa55aa55aa) : 0;
DrawDragRect(w, rect1, rect2, clip, n, color, sGetAniPat(pattern, animation));
}
END_UPP_NAMESPACE
#endif

View file

@ -1,367 +0,0 @@
#include <CtrlCore/CtrlCore.h>
#ifdef GUI_SKELETON
NAMESPACE_UPP
#define LLOG(x) // LOG(x)
#define LOGTIMING 0
#ifdef _DEBUG
#define LOGMESSAGES 0
#endif
#define ELOGW(x) // RLOG(GetSysTime() << ": " << x) // Only activate in MT!
#define ELOG(x) // RLOG(GetSysTime() << ": " << x)
bool Ctrl::IsAlphaSupported()
{
return false;
}
bool Ctrl::IsCompositedGui()
{
return false;
}
Vector<Ctrl *> Ctrl::GetTopCtrls()
{
Vector<Ctrl *> h;
return h;
}
void Ctrl::SetMouseCursor(const Image& image)
{
GuiLock __;
}
Ctrl *Ctrl::GetOwner()
{
GuiLock __;
return NULL;
}
Ctrl *Ctrl::GetActiveCtrl()
{
GuiLock __;
return NULL;
}
// Vector<Callback> Ctrl::hotkey;
int Ctrl::RegisterSystemHotKey(dword key, Callback cb)
{
/* ASSERT(key >= K_DELTA);
int q = hotkey.GetCount();
for(int i = 0; i < hotkey.GetCount(); i++)
if(!hotkey[i]) {
q = i;
break;
}
hotkey.At(q) = cb;
dword mod = 0;
if(key & K_ALT)
mod |= MOD_ALT;
if(key & K_SHIFT)
mod |= MOD_SHIFT;
if(key & K_CTRL)
mod |= MOD_CONTROL;
return RegisterHotKey(NULL, q, mod, key & 0xffff) ? q : -1;*/
return -1;
}
void Ctrl::UnregisterSystemHotKey(int id)
{
/* if(id >= 0 && id < hotkey.GetCount()) {
UnregisterHotKey(NULL, id);
hotkey[id].Clear();
}*/
}
bool Ctrl::IsWaitingEvent()
{
return false;
}
bool Ctrl::ProcessEvent(bool *quit)
{
ASSERT(IsMainThread());
return false;
}
void SweepMkImageCache();
bool Ctrl::ProcessEvents(bool *quit)
{
/* if(ProcessEvent(quit)) {
while(ProcessEvent(quit) && (!LoopCtrl || LoopCtrl->InLoop())); // LoopCtrl-MF 071008
TimerProc(GetTickCount());
SweepMkImageCache();
return true;
}
SweepMkImageCache();
TimerProc(GetTickCount());*/
return false;
}
void Ctrl::EventLoop(Ctrl *ctrl)
{
GuiLock __;
/* ASSERT(IsMainThread());
ASSERT(LoopLevel == 0 || ctrl);
LoopLevel++;
LLOG("Entering event loop at level " << LoopLevel << BeginIndent);
Ptr<Ctrl> ploop;
if(ctrl) {
ploop = LoopCtrl;
LoopCtrl = ctrl;
ctrl->inloop = true;
}
bool quit = false;
ProcessEvents(&quit);
while(!EndSession() && !quit && ctrl ? ctrl->IsOpen() && ctrl->InLoop() : GetTopCtrls().GetCount())
{
// LLOG(GetSysTime() << " % " << (unsigned)msecs() % 10000 << ": EventLoop / GuiSleep");
SyncCaret();
GuiSleep(1000);
if(EndSession()) break;
// LLOG(GetSysTime() << " % " << (unsigned)msecs() % 10000 << ": EventLoop / ProcessEvents");
ProcessEvents(&quit);
// LLOG(GetSysTime() << " % " << (unsigned)msecs() % 10000 << ": EventLoop / after ProcessEvents");
}
if(ctrl)
LoopCtrl = ploop;
LoopLevel--;
LLOG(EndIndent << "Leaving event loop ");*/
}
void Ctrl::GuiSleep(int ms)
{
GuiLock __;
/* ASSERT(IsMainThread());
ELOG("GuiSleep");
if(EndSession())
return;
ELOG("GuiSleep 2");
int level = LeaveGMutexAll();
#if !defined(flagDLL) && !defined(PLATFORM_WINCE)
if(!OverwatchThread) {
DWORD dummy;
OverwatchThread = CreateThread(NULL, 0x100000, Win32OverwatchThread, NULL, 0, &dummy);
ELOG("ExitLoopEventWait 1");
ExitLoopEvent.Wait();
}
HANDLE h[1];
*h = ExitLoopEvent.GetHandle();
ELOG("ExitLoopEventWait 2 " << (void *)*h);
MsgWaitForMultipleObjects(1, h, FALSE, ms, QS_ALLINPUT);
#else
MsgWaitForMultipleObjects(0, NULL, FALSE, ms, QS_ALLINPUT);
#endif
EnterGMutex(level);*/
}
Rect Ctrl::GetWndScreenRect() const
{
GuiLock __;
Rect r;
return r;
}
void Ctrl::WndShow(bool b)
{
GuiLock __;
}
void Ctrl::WndUpdate()
{
GuiLock __;
}
bool Ctrl::IsWndOpen() const {
GuiLock __;
return false;
}
void Ctrl::SetAlpha(byte alpha)
{
GuiLock __;
}
Rect Ctrl::GetWorkArea() const
{
GuiLock __;
return Rect();
}
void Ctrl::GetWorkArea(Array<Rect>& rc)
{
GuiLock __;
}
Rect Ctrl::GetVirtualWorkArea()
{
Rect out = GetPrimaryWorkArea();
Array<Rect> rc;
GetWorkArea(rc);
for(int i = 0; i < rc.GetCount(); i++)
out |= rc[i];
return out;
}
Rect Ctrl::GetVirtualScreenArea()
{
GuiLock __;
return Rect();
}
Rect Ctrl::GetPrimaryWorkArea()
{
Rect r;
return r;
}
Rect Ctrl::GetPrimaryScreenArea()
{
return Size();
}
int Ctrl::GetKbdDelay()
{
GuiLock __;
return 500;
}
int Ctrl::GetKbdSpeed()
{
GuiLock __;
return 1000 / 32;
}
void Ctrl::WndDestroy()
{
}
void Ctrl::SetWndForeground()
{
GuiLock __;
}
bool Ctrl::IsWndForeground() const
{
GuiLock __;
return true;
}
void Ctrl::WndEnable(bool)
{
GuiLock __;
}
bool Ctrl::SetWndFocus()
{
GuiLock __;
return true;
}
bool Ctrl::HasWndFocus() const
{
GuiLock __;
return false;
}
bool Ctrl::SetWndCapture()
{
GuiLock __;
ASSERT(IsMainThread());
return false;
}
bool Ctrl::ReleaseWndCapture()
{
GuiLock __;
ASSERT(IsMainThread());
return false;
}
bool Ctrl::HasWndCapture() const
{
GuiLock __;
return false;
}
void Ctrl::WndInvalidateRect(const Rect& r)
{
GuiLock __;
}
void Ctrl::WndSetPos(const Rect& rect)
{
GuiLock __;
}
void Ctrl::WndUpdate(const Rect& r)
{
GuiLock __;
}
void Ctrl::WndScrollView(const Rect& r, int dx, int dy)
{
GuiLock __;
}
void Ctrl::PopUp(Ctrl *owner, bool savebits, bool activate, bool dropshadow, bool topmost)
{
}
Rect Ctrl::GetDefaultWindowRect() {
return Rect(0, 0, 100, 100);
}
ViewDraw::ViewDraw(Ctrl *ctrl)
{
EnterGuiMutex();
}
ViewDraw::~ViewDraw()
{
LeaveGuiMutex();
}
Vector<WString> SplitCmdLine__(const char *cmd)
{
Vector<WString> out;
while(*cmd)
if((byte)*cmd <= ' ')
cmd++;
else if(*cmd == '\"') {
WString quoted;
while(*++cmd && (*cmd != '\"' || *++cmd == '\"'))
quoted.Cat(FromSystemCharset(String(cmd, 1)).ToWString());
out.Add(quoted);
}
else {
const char *begin = cmd;
while((byte)*cmd > ' ')
cmd++;
out.Add(String(begin, cmd).ToWString());
}
return out;
}
void Ctrl::SysEndLoop()
{
}
void FinishDragRect(Ctrl& q)
{
}
END_UPP_NAMESPACE
#endif

View file

@ -1,3 +0,0 @@
#ifndef _Skeleton_icpp_init_stub
#define _Skeleton_icpp_init_stub
#endif