|
@@ -21,9 +21,8 @@
|
|
|
|
|
|
|
|
using namespace Framework;
|
|
using namespace Framework;
|
|
|
#ifdef WIN32
|
|
#ifdef WIN32
|
|
|
-// Fensterklasse erzeugen
|
|
|
|
|
-WNDCLASS Framework::F_Normal(
|
|
|
|
|
- HINSTANCE hInst) // Erzeugen einer normalen Fensterklasse
|
|
|
|
|
|
|
+// Create window class
|
|
|
|
|
+WNDCLASS Framework::F_Normal(HINSTANCE hInst) // Creates a normal window class
|
|
|
{
|
|
{
|
|
|
if (!hInst) hInst = _hinst;
|
|
if (!hInst) hInst = _hinst;
|
|
|
WNDCLASS ret;
|
|
WNDCLASS ret;
|
|
@@ -65,19 +64,19 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
if (msgExit) return (DefWindowProc(hwnd, message, wparam, lparam));
|
|
if (msgExit) return (DefWindowProc(hwnd, message, wparam, lparam));
|
|
|
switch (message)
|
|
switch (message)
|
|
|
{
|
|
{
|
|
|
- case WM_SETCURSOR: // Maus Zeiger
|
|
|
|
|
|
|
+ case WM_SETCURSOR: // Mouse cursor
|
|
|
MausZeiger.update();
|
|
MausZeiger.update();
|
|
|
return 0;
|
|
return 0;
|
|
|
- case WM_SIZE: // Fenster
|
|
|
|
|
|
|
+ case WM_SIZE: // Window
|
|
|
if (wparam == SIZE_RESTORED) WFensterA.sendRestoreMessage(hwnd);
|
|
if (wparam == SIZE_RESTORED) WFensterA.sendRestoreMessage(hwnd);
|
|
|
break;
|
|
break;
|
|
|
- case WM_CLOSE: // Schliessen
|
|
|
|
|
|
|
+ case WM_CLOSE: // Close
|
|
|
if (WFensterA.sendVSchliessMessage(hwnd)) return 0;
|
|
if (WFensterA.sendVSchliessMessage(hwnd)) return 0;
|
|
|
break;
|
|
break;
|
|
|
case WM_DESTROY:
|
|
case WM_DESTROY:
|
|
|
if (WFensterA.sendNSchliessMessage(hwnd)) return 0;
|
|
if (WFensterA.sendNSchliessMessage(hwnd)) return 0;
|
|
|
- break; // Maus
|
|
|
|
|
- case WM_LBUTTONDOWN: // Linksklick
|
|
|
|
|
|
|
+ break; // Mouse
|
|
|
|
|
+ case WM_LBUTTONDOWN: // Left click
|
|
|
{
|
|
{
|
|
|
MausStand[M_Links] = 1;
|
|
MausStand[M_Links] = 1;
|
|
|
MausEreignis me = {ME_PLinks,
|
|
MausEreignis me = {ME_PLinks,
|
|
@@ -90,7 +89,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- case WM_RBUTTONDOWN: // Rechtsklick
|
|
|
|
|
|
|
+ case WM_RBUTTONDOWN: // Right click
|
|
|
{
|
|
{
|
|
|
MausStand[M_Rechts] = 1;
|
|
MausStand[M_Rechts] = 1;
|
|
|
MausEreignis me = {ME_PRechts,
|
|
MausEreignis me = {ME_PRechts,
|
|
@@ -103,7 +102,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- case WM_MBUTTONDOWN: // Mittelklick
|
|
|
|
|
|
|
+ case WM_MBUTTONDOWN: // Middle click
|
|
|
{
|
|
{
|
|
|
MausStand[M_Mitte] = 1;
|
|
MausStand[M_Mitte] = 1;
|
|
|
MausEreignis me = {ME_PMitte,
|
|
MausEreignis me = {ME_PMitte,
|
|
@@ -116,7 +115,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- case WM_LBUTTONUP: // Linksrelease
|
|
|
|
|
|
|
+ case WM_LBUTTONUP: // Left release
|
|
|
{
|
|
{
|
|
|
MausStand[M_Links] = 0;
|
|
MausStand[M_Links] = 0;
|
|
|
MausEreignis me = {ME_RLinks,
|
|
MausEreignis me = {ME_RLinks,
|
|
@@ -129,7 +128,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- case WM_RBUTTONUP: // Rechtsrelease
|
|
|
|
|
|
|
+ case WM_RBUTTONUP: // Right release
|
|
|
{
|
|
{
|
|
|
MausStand[M_Rechts] = 0;
|
|
MausStand[M_Rechts] = 0;
|
|
|
MausEreignis me = {ME_RRechts,
|
|
MausEreignis me = {ME_RRechts,
|
|
@@ -142,7 +141,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- case WM_MBUTTONUP: // Mittelrelease
|
|
|
|
|
|
|
+ case WM_MBUTTONUP: // Middle release
|
|
|
{
|
|
{
|
|
|
MausStand[M_Mitte] = 0;
|
|
MausStand[M_Mitte] = 0;
|
|
|
MausEreignis me = {ME_RMitte,
|
|
MausEreignis me = {ME_RMitte,
|
|
@@ -155,7 +154,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- case WM_LBUTTONDBLCLK: // Linksdoppelklick
|
|
|
|
|
|
|
+ case WM_LBUTTONDBLCLK: // Left double click
|
|
|
{
|
|
{
|
|
|
MausEreignis me = {ME_DKLinks,
|
|
MausEreignis me = {ME_DKLinks,
|
|
|
(int)LOWORD(lparam),
|
|
(int)LOWORD(lparam),
|
|
@@ -167,7 +166,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- case WM_RBUTTONDBLCLK: // Rechtsdoppelklick
|
|
|
|
|
|
|
+ case WM_RBUTTONDBLCLK: // Right double click
|
|
|
{
|
|
{
|
|
|
MausEreignis me = {ME_DKRechts,
|
|
MausEreignis me = {ME_DKRechts,
|
|
|
(int)LOWORD(lparam),
|
|
(int)LOWORD(lparam),
|
|
@@ -179,7 +178,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- case WM_MBUTTONDBLCLK: // Mitteldoppelklick
|
|
|
|
|
|
|
+ case WM_MBUTTONDBLCLK: // Middle double click
|
|
|
{
|
|
{
|
|
|
MausEreignis me = {ME_DKMitte,
|
|
MausEreignis me = {ME_DKMitte,
|
|
|
(int)LOWORD(lparam),
|
|
(int)LOWORD(lparam),
|
|
@@ -191,7 +190,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- case WM_MOUSEHOVER: // Maus betritt Fenster
|
|
|
|
|
|
|
+ case WM_MOUSEHOVER: // Mouse enters window
|
|
|
{
|
|
{
|
|
|
MausTrack = 1;
|
|
MausTrack = 1;
|
|
|
MausEreignis me = {ME_Betritt,
|
|
MausEreignis me = {ME_Betritt,
|
|
@@ -204,7 +203,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- case WM_MOUSELEAVE: // Maus verlaesst Fenster
|
|
|
|
|
|
|
+ case WM_MOUSELEAVE: // Mouse leaves window
|
|
|
{
|
|
{
|
|
|
MausTrack = 1;
|
|
MausTrack = 1;
|
|
|
MausEreignis me = {ME_Leaves,
|
|
MausEreignis me = {ME_Leaves,
|
|
@@ -217,7 +216,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- case WM_MOUSEMOVE: // Maus wird bewegt
|
|
|
|
|
|
|
+ case WM_MOUSEMOVE: // Mouse is moving
|
|
|
{
|
|
{
|
|
|
if (MausTrack)
|
|
if (MausTrack)
|
|
|
{
|
|
{
|
|
@@ -239,7 +238,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- case WM_MOUSEWHEEL: // Maus scroll
|
|
|
|
|
|
|
+ case WM_MOUSEWHEEL: // Mouse scroll
|
|
|
{
|
|
{
|
|
|
Punkt pos = getMausPos();
|
|
Punkt pos = getMausPos();
|
|
|
RECT r;
|
|
RECT r;
|
|
@@ -254,7 +253,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
WFensterA.sendMausMessage(hwnd, me);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- // Tastatur
|
|
|
|
|
|
|
+ // Keyboard
|
|
|
case WM_KEYDOWN:
|
|
case WM_KEYDOWN:
|
|
|
{
|
|
{
|
|
|
TastaturEreignis te = {
|
|
TastaturEreignis te = {
|
|
@@ -264,7 +263,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
CalculateEnteredString((int)wparam, 0, te);
|
|
CalculateEnteredString((int)wparam, 0, te);
|
|
|
WFensterA.sendTastaturMessage(hwnd, te);
|
|
WFensterA.sendTastaturMessage(hwnd, te);
|
|
|
return 0;
|
|
return 0;
|
|
|
- } // Taste wird gedrueckt
|
|
|
|
|
|
|
+ } // Key is pressed
|
|
|
case WM_KEYUP:
|
|
case WM_KEYUP:
|
|
|
{
|
|
{
|
|
|
TastaturEreignis te = {
|
|
TastaturEreignis te = {
|
|
@@ -274,7 +273,7 @@ LRESULT CALLBACK Framework::WindowProc(
|
|
|
CalculateEnteredString((int)wparam, HIWORD(lparam) & 0xFF, te);
|
|
CalculateEnteredString((int)wparam, HIWORD(lparam) & 0xFF, te);
|
|
|
WFensterA.sendTastaturMessage(hwnd, te);
|
|
WFensterA.sendTastaturMessage(hwnd, te);
|
|
|
return 0;
|
|
return 0;
|
|
|
- } // Taste wird losgelassen
|
|
|
|
|
|
|
+ } // Key is released
|
|
|
}
|
|
}
|
|
|
return (DefWindowProc(hwnd, message, wparam, lparam));
|
|
return (DefWindowProc(hwnd, message, wparam, lparam));
|
|
|
}
|
|
}
|
|
@@ -363,18 +362,17 @@ WFenster::~WFenster()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// non-constant
|
|
// non-constant
|
|
|
-void WFenster::erstellen(
|
|
|
|
|
- int style, WNDCLASS wc) // Erstellt ein Fenster in Windows
|
|
|
|
|
|
|
+void WFenster::erstellen(int style, WNDCLASS wc) // Creates a window in Windows
|
|
|
{
|
|
{
|
|
|
if (!GetClassInfo(wc.hInstance, wc.lpszClassName, &wc))
|
|
if (!GetClassInfo(wc.hInstance, wc.lpszClassName, &wc))
|
|
|
{
|
|
{
|
|
|
# pragma warning(suppress : 6102)
|
|
# pragma warning(suppress : 6102)
|
|
|
- if (!RegisterClass(&wc)) // Register Fensterklasse
|
|
|
|
|
|
|
+ if (!RegisterClass(&wc)) // Register window class
|
|
|
{
|
|
{
|
|
|
MessageBox(hWnd,
|
|
MessageBox(hWnd,
|
|
|
"Fehler beim Registrieren der Fensterklasse!",
|
|
"Fehler beim Registrieren der Fensterklasse!",
|
|
|
"Error",
|
|
"Error",
|
|
|
- MB_ICONERROR); // Fehlermeldung bei Fehler
|
|
|
|
|
|
|
+ MB_ICONERROR); // Error message on failure
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -389,31 +387,31 @@ void WFenster::erstellen(
|
|
|
0,
|
|
0,
|
|
|
0,
|
|
0,
|
|
|
wc.hInstance,
|
|
wc.hInstance,
|
|
|
- 0); // Fenster Erstellen
|
|
|
|
|
|
|
+ 0); // Create window
|
|
|
|
|
|
|
|
if (hWnd == 0)
|
|
if (hWnd == 0)
|
|
|
{
|
|
{
|
|
|
MessageBox(hWnd,
|
|
MessageBox(hWnd,
|
|
|
"Fehler beim erstellen des Fensters!",
|
|
"Fehler beim erstellen des Fensters!",
|
|
|
"Error",
|
|
"Error",
|
|
|
- MB_ICONERROR); // Fehlermeldung bei Fehler
|
|
|
|
|
|
|
+ MB_ICONERROR); // Error message on failure
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
this->style = style;
|
|
this->style = style;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void WFenster::erstellenEx(
|
|
void WFenster::erstellenEx(
|
|
|
- int exStyle, int style, WNDCLASSEX wc) // Das Fenster Erstellen
|
|
|
|
|
|
|
+ int exStyle, int style, WNDCLASSEX wc) // Create the window
|
|
|
{
|
|
{
|
|
|
if (!GetClassInfoEx(wc.hInstance, wc.lpszClassName, &wc))
|
|
if (!GetClassInfoEx(wc.hInstance, wc.lpszClassName, &wc))
|
|
|
{
|
|
{
|
|
|
# pragma warning(suppress : 6102)
|
|
# pragma warning(suppress : 6102)
|
|
|
- if (!RegisterClassEx(&wc)) // Register Fensterklasse
|
|
|
|
|
|
|
+ if (!RegisterClassEx(&wc)) // Register window class
|
|
|
{
|
|
{
|
|
|
MessageBox(hWnd,
|
|
MessageBox(hWnd,
|
|
|
"Fehler beim Registrieren der Fensterklasse!",
|
|
"Fehler beim Registrieren der Fensterklasse!",
|
|
|
"Error",
|
|
"Error",
|
|
|
- MB_ICONERROR); // Fehlermeldung bei Fehler
|
|
|
|
|
|
|
+ MB_ICONERROR); // Error message on failure
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -429,20 +427,20 @@ void WFenster::erstellenEx(
|
|
|
0,
|
|
0,
|
|
|
0,
|
|
0,
|
|
|
wc.hInstance,
|
|
wc.hInstance,
|
|
|
- 0); // Fenster Erstellen
|
|
|
|
|
|
|
+ 0); // Create window
|
|
|
|
|
|
|
|
if (hWnd == 0)
|
|
if (hWnd == 0)
|
|
|
{
|
|
{
|
|
|
MessageBox(hWnd,
|
|
MessageBox(hWnd,
|
|
|
"Fehler beim erstellen des Fensters!",
|
|
"Fehler beim erstellen des Fensters!",
|
|
|
"Error",
|
|
"Error",
|
|
|
- MB_ICONERROR); // Fehlermeldung bei Fehler
|
|
|
|
|
|
|
+ MB_ICONERROR); // Error message on failure
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
this->style = style;
|
|
this->style = style;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void WFenster::setAnzeigeModus(int mod) // Fenster Anzeigen
|
|
|
|
|
|
|
+void WFenster::setAnzeigeModus(int mod) // Display window
|
|
|
{
|
|
{
|
|
|
if (rahmen)
|
|
if (rahmen)
|
|
|
{
|
|
{
|
|
@@ -454,7 +452,7 @@ void WFenster::setAnzeigeModus(int mod) // Fenster Anzeigen
|
|
|
ShowWindow(hWnd, mod);
|
|
ShowWindow(hWnd, mod);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-bool WFenster::setFokus() // Setzt den Fokus auf das Fenster
|
|
|
|
|
|
|
+bool WFenster::setFokus() // Sets the focus on the window
|
|
|
{
|
|
{
|
|
|
DWORD dwCurrentThread = GetCurrentThreadId();
|
|
DWORD dwCurrentThread = GetCurrentThreadId();
|
|
|
DWORD dwFGThread = GetWindowThreadProcessId(GetForegroundWindow(), NULL);
|
|
DWORD dwFGThread = GetWindowThreadProcessId(GetForegroundWindow(), NULL);
|
|
@@ -478,7 +476,7 @@ bool WFenster::setFokus() // Setzt den Fokus auf das Fenster
|
|
|
return GetFocus() == hWnd;
|
|
return GetFocus() == hWnd;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void WFenster::setPosition(const Punkt& p) // Fenster Position
|
|
|
|
|
|
|
+void WFenster::setPosition(const Punkt& p) // Window position
|
|
|
{
|
|
{
|
|
|
setPosition(p.x, p.y);
|
|
setPosition(p.x, p.y);
|
|
|
}
|
|
}
|
|
@@ -486,7 +484,7 @@ void WFenster::setPosition(const Punkt& p) // Fenster Position
|
|
|
void WFenster::setPosition(int x, int y)
|
|
void WFenster::setPosition(int x, int y)
|
|
|
{
|
|
{
|
|
|
RECT r;
|
|
RECT r;
|
|
|
- GetWindowRect(hWnd, &r); // Vorherige Position herausfinden
|
|
|
|
|
|
|
+ GetWindowRect(hWnd, &r); // Find previous position
|
|
|
RECT res;
|
|
RECT res;
|
|
|
res.left = x, res.top = y, res.right = r.right - r.left,
|
|
res.left = x, res.top = y, res.right = r.right - r.left,
|
|
|
res.bottom = r.bottom - r.top;
|
|
res.bottom = r.bottom - r.top;
|
|
@@ -497,35 +495,35 @@ void WFenster::setPosition(int x, int y)
|
|
|
res.top,
|
|
res.top,
|
|
|
res.right,
|
|
res.right,
|
|
|
res.bottom,
|
|
res.bottom,
|
|
|
- 0); // Position aendern
|
|
|
|
|
|
|
+ 0); // Change position
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void WFenster::setSize(Punkt& g) // Fenster Groesse
|
|
|
|
|
|
|
+void WFenster::setSize(Punkt& g) // Window size
|
|
|
{
|
|
{
|
|
|
RECT r;
|
|
RECT r;
|
|
|
- GetWindowRect(hWnd, &r); // vorherige Groesse herausfinden
|
|
|
|
|
|
|
+ GetWindowRect(hWnd, &r); // Find previous size
|
|
|
RECT res;
|
|
RECT res;
|
|
|
res.left = r.left, res.top = r.top, res.right = g.x, res.bottom = g.y;
|
|
res.left = r.left, res.top = r.top, res.right = g.x, res.bottom = g.y;
|
|
|
AdjustWindowRect(&res, style, 0);
|
|
AdjustWindowRect(&res, style, 0);
|
|
|
SetWindowPos(
|
|
SetWindowPos(
|
|
|
- hWnd, 0, res.left, res.top, res.right, res.bottom, 0); // Groesse aendern
|
|
|
|
|
|
|
+ hWnd, 0, res.left, res.top, res.right, res.bottom, 0); // Change size
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void WFenster::setSize(int breite, int hoehe)
|
|
void WFenster::setSize(int breite, int hoehe)
|
|
|
{
|
|
{
|
|
|
RECT r;
|
|
RECT r;
|
|
|
- GetWindowRect(hWnd, &r); // vorherige Groesse herausfinden
|
|
|
|
|
|
|
+ GetWindowRect(hWnd, &r); // Find previous size
|
|
|
RECT res;
|
|
RECT res;
|
|
|
res.left = r.left, res.top = r.top, res.right = breite, res.bottom = hoehe;
|
|
res.left = r.left, res.top = r.top, res.right = breite, res.bottom = hoehe;
|
|
|
AdjustWindowRect(&res, style, 0);
|
|
AdjustWindowRect(&res, style, 0);
|
|
|
SetWindowPos(
|
|
SetWindowPos(
|
|
|
- hWnd, 0, res.left, res.top, res.right, res.bottom, 0); // Groesse aendern
|
|
|
|
|
|
|
+ hWnd, 0, res.left, res.top, res.right, res.bottom, 0); // Change size
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void WFenster::setBounds(
|
|
void WFenster::setBounds(
|
|
|
- const Punkt& p, const Punkt& g) // setzt groesse und Position
|
|
|
|
|
|
|
+ const Punkt& p, const Punkt& g) // sets size and position
|
|
|
{
|
|
{
|
|
|
- SetWindowPos(hWnd, 0, p.x, p.y, g.x, g.y, 0); // Groesse und Position aendern
|
|
|
|
|
|
|
+ SetWindowPos(hWnd, 0, p.x, p.y, g.x, g.y, 0); // Change size and position
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void WFenster::setBildschirm(Bildschirm* screen)
|
|
void WFenster::setBildschirm(Bildschirm* screen)
|
|
@@ -554,7 +552,7 @@ void WFenster::doMausAktion(MausEreignis& me)
|
|
|
screen->doMausEreignis(me);
|
|
screen->doMausEreignis(me);
|
|
|
if (!me.verarbeitet && verschiebbar)
|
|
if (!me.verarbeitet && verschiebbar)
|
|
|
{
|
|
{
|
|
|
- if (mx != -1 && my != -1) // verschieben
|
|
|
|
|
|
|
+ if (mx != -1 && my != -1) // move
|
|
|
{
|
|
{
|
|
|
RECT r;
|
|
RECT r;
|
|
|
if (rahmen)
|
|
if (rahmen)
|
|
@@ -569,10 +567,10 @@ void WFenster::doMausAktion(MausEreignis& me)
|
|
|
r.top,
|
|
r.top,
|
|
|
r.right,
|
|
r.right,
|
|
|
r.bottom,
|
|
r.bottom,
|
|
|
- 0); // Position setzen
|
|
|
|
|
|
|
+ 0); // Set position
|
|
|
}
|
|
}
|
|
|
- GetWindowRect(hWnd, &r); // Vorherige Position herausfinden
|
|
|
|
|
- r.right -= r.left, r.bottom -= r.top; // Position updaten
|
|
|
|
|
|
|
+ GetWindowRect(hWnd, &r); // Find previous position
|
|
|
|
|
+ r.right -= r.left, r.bottom -= r.top; // Update position
|
|
|
r.left += me.mx - mx;
|
|
r.left += me.mx - mx;
|
|
|
r.top += me.my - my;
|
|
r.top += me.my - my;
|
|
|
SetWindowPos(hWnd,
|
|
SetWindowPos(hWnd,
|
|
@@ -581,11 +579,11 @@ void WFenster::doMausAktion(MausEreignis& me)
|
|
|
r.top,
|
|
r.top,
|
|
|
r.right,
|
|
r.right,
|
|
|
r.bottom,
|
|
r.bottom,
|
|
|
- 0); // Position setzen
|
|
|
|
|
|
|
+ 0); // Set position
|
|
|
}
|
|
}
|
|
|
- else if (me.id == ME_PLinks) // verschieben starten
|
|
|
|
|
|
|
+ else if (me.id == ME_PLinks) // start moving
|
|
|
mx = me.mx, my = me.my;
|
|
mx = me.mx, my = me.my;
|
|
|
- if (me.id == ME_RLinks) // verschieben beenden
|
|
|
|
|
|
|
+ if (me.id == ME_RLinks) // stop moving
|
|
|
mx = -1, my = -1;
|
|
mx = -1, my = -1;
|
|
|
me.verarbeitet = 1;
|
|
me.verarbeitet = 1;
|
|
|
}
|
|
}
|
|
@@ -610,26 +608,26 @@ void WFenster::doTastaturAktion(TastaturEreignis& te)
|
|
|
if (screen) screen->doTastaturEreignis(te);
|
|
if (screen) screen->doTastaturEreignis(te);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void WFenster::doRestoreMessage() // macht den Rahmen sichtbar
|
|
|
|
|
|
|
+void WFenster::doRestoreMessage() // makes the border visible
|
|
|
{
|
|
{
|
|
|
if (rahmen) ShowWindow(rahmen, 1);
|
|
if (rahmen) ShowWindow(rahmen, 1);
|
|
|
ShowWindow(hWnd, 1);
|
|
ShowWindow(hWnd, 1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void WFenster::setMausEreignisParameter(
|
|
void WFenster::setMausEreignisParameter(
|
|
|
- void* p) // setzt den Parameter vom Maus Ereignis
|
|
|
|
|
|
|
+ void* p) // sets the mouse event parameter
|
|
|
{
|
|
{
|
|
|
makParam = p;
|
|
makParam = p;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void WFenster::setSchliessEreignisParameter(
|
|
void WFenster::setSchliessEreignisParameter(
|
|
|
- void* p) // setzt den Parameter vom Schliess Ereignis
|
|
|
|
|
|
|
+ void* p) // sets the close event parameter
|
|
|
{
|
|
{
|
|
|
sakParam = p;
|
|
sakParam = p;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void WFenster::setTastaturEreignisParameter(
|
|
void WFenster::setTastaturEreignisParameter(
|
|
|
- void* p) // setzt den Parameter vom Tastatur Ereignis
|
|
|
|
|
|
|
+ void* p) // sets the keyboard event parameter
|
|
|
{
|
|
{
|
|
|
takParam = p;
|
|
takParam = p;
|
|
|
}
|
|
}
|
|
@@ -654,23 +652,23 @@ void WFenster::setTastaturAktion(TastaturAktion tastaturAk)
|
|
|
tastaturAktion = tastaturAk;
|
|
tastaturAktion = tastaturAk;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void WFenster::setFensterHandle(HWND hWnd) // setzt das operationsfenster
|
|
|
|
|
|
|
+void WFenster::setFensterHandle(HWND hWnd) // sets the operation window
|
|
|
{
|
|
{
|
|
|
this->hWnd = hWnd;
|
|
this->hWnd = hWnd;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void WFenster::setVerschiebbar(
|
|
void WFenster::setVerschiebbar(
|
|
|
- bool verschiebbar) // legt fest, ob das Fenster durch ziehen mit Maus
|
|
|
|
|
- // verschoben werden kann
|
|
|
|
|
|
|
+ bool verschiebbar) // determines whether the window can be
|
|
|
|
|
+ // moved by dragging with the mouse
|
|
|
{
|
|
{
|
|
|
this->verschiebbar = verschiebbar;
|
|
this->verschiebbar = verschiebbar;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void WFenster::ladeRahmenFenster(Bild* zBild,
|
|
void WFenster::ladeRahmenFenster(Bild* zBild,
|
|
|
- HINSTANCE hinst) // setzt einen Transpatenten Rahmen um das Fenster
|
|
|
|
|
|
|
+ HINSTANCE hinst) // sets a transparent border around the window
|
|
|
{
|
|
{
|
|
|
if (!zBild) return;
|
|
if (!zBild) return;
|
|
|
- // Fenster erstellen
|
|
|
|
|
|
|
+ // Create window
|
|
|
WNDCLASSEX wcl = {0};
|
|
WNDCLASSEX wcl = {0};
|
|
|
wcl.cbSize = sizeof(wcl);
|
|
wcl.cbSize = sizeof(wcl);
|
|
|
wcl.style = CS_HREDRAW | CS_VREDRAW;
|
|
wcl.style = CS_HREDRAW | CS_VREDRAW;
|
|
@@ -685,7 +683,7 @@ void WFenster::ladeRahmenFenster(Bild* zBild,
|
|
|
wcl.lpszClassName = TEXT("LayeredWindowClass");
|
|
wcl.lpszClassName = TEXT("LayeredWindowClass");
|
|
|
wcl.hIconSm = NULL;
|
|
wcl.hIconSm = NULL;
|
|
|
|
|
|
|
|
- // Bitmap erstellen
|
|
|
|
|
|
|
+ // Create bitmap
|
|
|
hdc = CreateCompatibleDC(NULL);
|
|
hdc = CreateCompatibleDC(NULL);
|
|
|
if (!hdc) return;
|
|
if (!hdc) return;
|
|
|
BITMAPINFO info;
|
|
BITMAPINFO info;
|
|
@@ -700,7 +698,7 @@ void WFenster::ladeRahmenFenster(Bild* zBild,
|
|
|
= CreateDIBSection(hdc, &info, DIB_RGB_COLORS, (void**)&pPixels, 0, 0);
|
|
= CreateDIBSection(hdc, &info, DIB_RGB_COLORS, (void**)&pPixels, 0, 0);
|
|
|
if (!bitmap) DeleteDC(hdc);
|
|
if (!bitmap) DeleteDC(hdc);
|
|
|
GdiFlush();
|
|
GdiFlush();
|
|
|
- // bitmap fuellen
|
|
|
|
|
|
|
+ // Fill bitmap
|
|
|
int pitch = ((zBild->getBreite() * 32 + 31) & ~31) >> 3;
|
|
int pitch = ((zBild->getBreite() * 32 + 31) & ~31) >> 3;
|
|
|
unsigned char* pRow = 0;
|
|
unsigned char* pRow = 0;
|
|
|
int* buffer = zBild->getBuffer();
|
|
int* buffer = zBild->getBuffer();
|
|
@@ -722,7 +720,7 @@ void WFenster::ladeRahmenFenster(Bild* zBild,
|
|
|
& 0xFF);
|
|
& 0xFF);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- // alpha berechnen
|
|
|
|
|
|
|
+ // Calculate alpha
|
|
|
unsigned char* pPixel = 0;
|
|
unsigned char* pPixel = 0;
|
|
|
if (zBild->getBreite() * 4 == pitch)
|
|
if (zBild->getBreite() * 4 == pitch)
|
|
|
{
|
|
{
|
|
@@ -753,7 +751,7 @@ void WFenster::ladeRahmenFenster(Bild* zBild,
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- // Fenster erstellen fortsetzen
|
|
|
|
|
|
|
+ // Continue creating window
|
|
|
if (RegisterClassEx(&wcl))
|
|
if (RegisterClassEx(&wcl))
|
|
|
{
|
|
{
|
|
|
rahmen = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_LAYERED,
|
|
rahmen = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_LAYERED,
|
|
@@ -770,7 +768,7 @@ void WFenster::ladeRahmenFenster(Bild* zBild,
|
|
|
0);
|
|
0);
|
|
|
if (rahmen)
|
|
if (rahmen)
|
|
|
{
|
|
{
|
|
|
- // zeichnen
|
|
|
|
|
|
|
+ // draw
|
|
|
HDC h = 0;
|
|
HDC h = 0;
|
|
|
if ((h = GetDC(rahmen)) && bitmap)
|
|
if ((h = GetDC(rahmen)) && bitmap)
|
|
|
{
|
|
{
|
|
@@ -810,42 +808,42 @@ void WFenster::ladeRahmenFenster(Bild* zBild,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// constant
|
|
// constant
|
|
|
-Punkt WFenster::getPosition() const // gibt die Position zurueck
|
|
|
|
|
|
|
+Punkt WFenster::getPosition() const // returns the position
|
|
|
{
|
|
{
|
|
|
RECT r;
|
|
RECT r;
|
|
|
- GetWindowRect(hWnd, &r); // Position herausfinden
|
|
|
|
|
|
|
+ GetWindowRect(hWnd, &r); // Find position
|
|
|
return {r.left, r.top};
|
|
return {r.left, r.top};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-Punkt WFenster::getGroesse() const // gibt die Groesse zurueck
|
|
|
|
|
|
|
+Punkt WFenster::getGroesse() const // returns the size
|
|
|
{
|
|
{
|
|
|
RECT r;
|
|
RECT r;
|
|
|
- GetWindowRect(hWnd, &r); // Groesse herausfinden
|
|
|
|
|
|
|
+ GetWindowRect(hWnd, &r); // Find size
|
|
|
return {r.right - r.left, r.bottom - r.top};
|
|
return {r.right - r.left, r.bottom - r.top};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-Punkt WFenster::getKoerperGroesse() const // gibt die Fenster Koerpergroesse zurueck
|
|
|
|
|
|
|
+Punkt WFenster::getKoerperGroesse() const // returns the window body size
|
|
|
{
|
|
{
|
|
|
RECT r;
|
|
RECT r;
|
|
|
- GetClientRect(hWnd, &r); // Groesse herausfinden
|
|
|
|
|
|
|
+ GetClientRect(hWnd, &r); // Find size
|
|
|
return {r.right - r.left, r.bottom - r.top};
|
|
return {r.right - r.left, r.bottom - r.top};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int WFenster::getKoerperBreite() const // gibt die Fenster Koerperbreite zurueck
|
|
|
|
|
|
|
+int WFenster::getKoerperBreite() const // returns the window body width
|
|
|
{
|
|
{
|
|
|
RECT r;
|
|
RECT r;
|
|
|
- GetClientRect(hWnd, &r); // Groesse herausfinden
|
|
|
|
|
|
|
+ GetClientRect(hWnd, &r); // Find size
|
|
|
return r.right;
|
|
return r.right;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int WFenster::getKoerperHoehe() const // gibt die Fenster Koerperhoehe zurueck
|
|
|
|
|
|
|
+int WFenster::getKoerperHoehe() const // returns the window body height
|
|
|
{
|
|
{
|
|
|
RECT r;
|
|
RECT r;
|
|
|
- GetClientRect(hWnd, &r); // Groesse herausfinden
|
|
|
|
|
|
|
+ GetClientRect(hWnd, &r); // Find size
|
|
|
return r.bottom;
|
|
return r.bottom;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-HWND WFenster::getFensterHandle() const // gibt ein Handle zum Fenster zurueck
|
|
|
|
|
|
|
+HWND WFenster::getFensterHandle() const // returns a handle to the window
|
|
|
{
|
|
{
|
|
|
return hWnd;
|
|
return hWnd;
|
|
|
}
|
|
}
|
|
@@ -882,7 +880,7 @@ Bildschirm* WFenster::zBildschirm() const
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bool WFenster::istVerschiebbar()
|
|
bool WFenster::istVerschiebbar()
|
|
|
- const // prueft, ob das Fenster durch ziehen mit Maus verschoben werden kann
|
|
|
|
|
|
|
+ const // checks if the window can be moved by dragging with the mouse
|
|
|
{
|
|
{
|
|
|
return verschiebbar;
|
|
return verschiebbar;
|
|
|
}
|
|
}
|
|
@@ -1379,31 +1377,31 @@ void Fenster::doMausEreignis(MausEreignis& me, bool userRet)
|
|
|
if (hatStyleNicht(Style::Erlaubt)) me.verarbeitet = mvtmp;
|
|
if (hatStyleNicht(Style::Erlaubt)) me.verarbeitet = mvtmp;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// nicht const
|
|
|
|
|
-// -- Rahmen --
|
|
|
|
|
-void Fenster::setRahmenZ(Rahmen* ram) // setzt den rahmen
|
|
|
|
|
|
|
+// non-const
|
|
|
|
|
+// -- Border --
|
|
|
|
|
+void Fenster::setRahmenZ(Rahmen* ram) // sets the border
|
|
|
{
|
|
{
|
|
|
if (rahmen) rahmen->release();
|
|
if (rahmen) rahmen->release();
|
|
|
rahmen = ram;
|
|
rahmen = ram;
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setRFarbe(int f) // setzt die Rahmen Farbe
|
|
|
|
|
|
|
+void Fenster::setRFarbe(int f) // sets the border color
|
|
|
{
|
|
{
|
|
|
if (!rahmen) rahmen = new LRahmen();
|
|
if (!rahmen) rahmen = new LRahmen();
|
|
|
rahmen->setFarbe(f);
|
|
rahmen->setFarbe(f);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setRBreite(int br) // setzt die Breite des Rahmens
|
|
|
|
|
|
|
+void Fenster::setRBreite(int br) // sets the border width
|
|
|
{
|
|
{
|
|
|
if (!rahmen) rahmen = new LRahmen();
|
|
if (!rahmen) rahmen = new LRahmen();
|
|
|
rahmen->setRamenBreite(br);
|
|
rahmen->setRamenBreite(br);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Titel --
|
|
|
|
|
-void Fenster::setTitel(Text* txt) // setzt den Titel
|
|
|
|
|
|
|
+// -- Title --
|
|
|
|
|
+void Fenster::setTitel(Text* txt) // sets the title
|
|
|
{
|
|
{
|
|
|
if (!titel) titel = new TextFeld();
|
|
if (!titel) titel = new TextFeld();
|
|
|
titel->setText(txt);
|
|
titel->setText(txt);
|
|
@@ -1424,67 +1422,67 @@ void Fenster::setTitel(const char* txt)
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setTTextFeldZ(TextFeld* tf) // setzt das Titel TextFeld
|
|
|
|
|
|
|
+void Fenster::setTTextFeldZ(TextFeld* tf) // sets the title text field
|
|
|
{
|
|
{
|
|
|
if (titel) titel->release();
|
|
if (titel) titel->release();
|
|
|
titel = tf;
|
|
titel = tf;
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Schrift --
|
|
|
|
|
-void Fenster::setTSchriftZ(Schrift* schrift) // setzt die Titel Schrift
|
|
|
|
|
|
|
+// -- Font --
|
|
|
|
|
+void Fenster::setTSchriftZ(Schrift* schrift) // sets the title font
|
|
|
{
|
|
{
|
|
|
if (!titel) titel = new TextFeld();
|
|
if (!titel) titel = new TextFeld();
|
|
|
titel->setSchriftZ(schrift);
|
|
titel->setSchriftZ(schrift);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setTSFarbe(int f) // setzt die Titel Schrift Farbe
|
|
|
|
|
|
|
+void Fenster::setTSFarbe(int f) // sets the title font color
|
|
|
{
|
|
{
|
|
|
if (!titel) titel = new TextFeld();
|
|
if (!titel) titel = new TextFeld();
|
|
|
titel->setSchriftFarbe(f);
|
|
titel->setSchriftFarbe(f);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setTSSize(int gr) // setzt die Titel Schrift Groesse
|
|
|
|
|
|
|
+void Fenster::setTSSize(int gr) // sets the title font size
|
|
|
{
|
|
{
|
|
|
if (!titel) titel = new TextFeld();
|
|
if (!titel) titel = new TextFeld();
|
|
|
titel->setSchriftSize((unsigned char)gr);
|
|
titel->setSchriftSize((unsigned char)gr);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Titel Hintergrund --
|
|
|
|
|
-void Fenster::setTBgFarbe(int f) // setzt Titel Hintergrund farbe
|
|
|
|
|
|
|
+// -- Title Background --
|
|
|
|
|
+void Fenster::setTBgFarbe(int f) // sets title background color
|
|
|
{
|
|
{
|
|
|
if (!titel) titel = new TextFeld();
|
|
if (!titel) titel = new TextFeld();
|
|
|
titel->setHintergrundFarbe(f);
|
|
titel->setHintergrundFarbe(f);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Titel AlphaFeld --
|
|
|
|
|
-void Fenster::setTAlphaFeldZ(AlphaFeld* af) // setzt das Titel AlphaFeld
|
|
|
|
|
|
|
+// -- Title AlphaFeld --
|
|
|
|
|
+void Fenster::setTAlphaFeldZ(AlphaFeld* af) // sets the title AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!titel) titel = new TextFeld();
|
|
if (!titel) titel = new TextFeld();
|
|
|
titel->setAlphaFeldZ(af);
|
|
titel->setAlphaFeldZ(af);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setTAfFarbe(int f) // setzt die Titel AlphFeld Farbe
|
|
|
|
|
|
|
+void Fenster::setTAfFarbe(int f) // sets the title AlphaFeld color
|
|
|
{
|
|
{
|
|
|
if (!titel) titel = new TextFeld();
|
|
if (!titel) titel = new TextFeld();
|
|
|
titel->setAlphaFeldFarbe(f);
|
|
titel->setAlphaFeldFarbe(f);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setTAfStrength(int st) // setzt die Staerke des Titel AlphaFeldes
|
|
|
|
|
|
|
+void Fenster::setTAfStrength(int st) // sets the strength of the title AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!titel) titel = new TextFeld();
|
|
if (!titel) titel = new TextFeld();
|
|
|
titel->setAlphaFeldStrength(st);
|
|
titel->setAlphaFeldStrength(st);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Titel Hintergrund Bild --
|
|
|
|
|
-void Fenster::setTBgBild(Bild* b) // setzt das Titel Hintergrund Bild
|
|
|
|
|
|
|
+// -- Title Background Image --
|
|
|
|
|
+void Fenster::setTBgBild(Bild* b) // sets the title background image
|
|
|
{
|
|
{
|
|
|
if (!titel) titel = new TextFeld();
|
|
if (!titel) titel = new TextFeld();
|
|
|
titel->setHintergrundBild(b);
|
|
titel->setHintergrundBild(b);
|
|
@@ -1498,37 +1496,37 @@ void Fenster::setTBgBildZ(Bild* b)
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Titel Rahmen --
|
|
|
|
|
-void Fenster::setTRahmenZ(Rahmen* ram) // set Titel Rahmen
|
|
|
|
|
|
|
+// -- Title Border --
|
|
|
|
|
+void Fenster::setTRahmenZ(Rahmen* ram) // sets the title border
|
|
|
{
|
|
{
|
|
|
if (!titel) titel = new TextFeld();
|
|
if (!titel) titel = new TextFeld();
|
|
|
titel->setRahmenZ(ram);
|
|
titel->setRahmenZ(ram);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setTRFarbe(int f) // setzt die Titel Rahmen Farbe
|
|
|
|
|
|
|
+void Fenster::setTRFarbe(int f) // sets the title border color
|
|
|
{
|
|
{
|
|
|
if (!titel) titel = new TextFeld();
|
|
if (!titel) titel = new TextFeld();
|
|
|
titel->setRahmenFarbe(f);
|
|
titel->setRahmenFarbe(f);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setTRBreite(int br) // setzt die Titel Rahmen Breite
|
|
|
|
|
|
|
+void Fenster::setTRBreite(int br) // sets the title border width
|
|
|
{
|
|
{
|
|
|
if (!titel) titel = new TextFeld();
|
|
if (!titel) titel = new TextFeld();
|
|
|
titel->setRahmenBreite(br);
|
|
titel->setRahmenBreite(br);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Koerper Hintergrund --
|
|
|
|
|
-void Fenster::setKBgFarbe(int f) // setzt die Koerper Hintergrund Farbe
|
|
|
|
|
|
|
+// -- Body Background --
|
|
|
|
|
+void Fenster::setKBgFarbe(int f) // sets the body background color
|
|
|
{
|
|
{
|
|
|
bgBodyColor = f;
|
|
bgBodyColor = f;
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Koerper Hintergrund Bild --
|
|
|
|
|
-void Fenster::setKBgBild(Bild* b) // setzt das Koerper Hintergrund Bild
|
|
|
|
|
|
|
+// -- Body Background Image --
|
|
|
|
|
+void Fenster::setKBgBild(Bild* b) // sets the body background image
|
|
|
{
|
|
{
|
|
|
if (!bgBodyPicture) bgBodyPicture = new Bild();
|
|
if (!bgBodyPicture) bgBodyPicture = new Bild();
|
|
|
bgBodyPicture->neuBild(b->getBreite(), b->getHeight(), 0);
|
|
bgBodyPicture->neuBild(b->getBreite(), b->getHeight(), 0);
|
|
@@ -1548,49 +1546,48 @@ void Fenster::setKBgBildZ(Bild* b)
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Koerper AlphaFeld --
|
|
|
|
|
-void Fenster::setKAlphaFeldZ(AlphaFeld* af) // setzt das Koerper AlphaFeld
|
|
|
|
|
|
|
+// -- Body AlphaFeld --
|
|
|
|
|
+void Fenster::setKAlphaFeldZ(AlphaFeld* af) // sets the body AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (bodyBuffer) bodyBuffer->release();
|
|
if (bodyBuffer) bodyBuffer->release();
|
|
|
bodyBuffer = af;
|
|
bodyBuffer = af;
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setKAfFarbe(int f) // setzt Koerper AlphaFeld Farbe
|
|
|
|
|
|
|
+void Fenster::setKAfFarbe(int f) // sets body AlphaFeld color
|
|
|
{
|
|
{
|
|
|
if (!bodyBuffer) bodyBuffer = new AlphaFeld();
|
|
if (!bodyBuffer) bodyBuffer = new AlphaFeld();
|
|
|
bodyBuffer->setFarbe(f);
|
|
bodyBuffer->setFarbe(f);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setKAfStrength(int st) // setzt die Staerke des Koerper AlphaFeldes
|
|
|
|
|
|
|
+void Fenster::setKAfStrength(int st) // sets the strength of the body AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!bodyBuffer) bodyBuffer = new AlphaFeld();
|
|
if (!bodyBuffer) bodyBuffer = new AlphaFeld();
|
|
|
bodyBuffer->setStrength(st);
|
|
bodyBuffer->setStrength(st);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Schliessen --
|
|
|
|
|
|
|
+// -- Close --
|
|
|
void Fenster::setClosingMeParam(void* param)
|
|
void Fenster::setClosingMeParam(void* param)
|
|
|
{
|
|
{
|
|
|
closingMeParam = param;
|
|
closingMeParam = param;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setClosingMe(
|
|
|
|
|
- MausAktion closingMe) // setzt das Schliessen Mausereignis
|
|
|
|
|
|
|
+void Fenster::setClosingMe(MausAktion closingMe) // sets the close mouse event
|
|
|
{
|
|
{
|
|
|
this->closingMe = closingMe;
|
|
this->closingMe = closingMe;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Schliessen Hintergrund --
|
|
|
|
|
-void Fenster::setSBgFarbe(int f) // setzt die Schliess Hintergrund Farbe
|
|
|
|
|
|
|
+// -- Close Background --
|
|
|
|
|
+void Fenster::setSBgFarbe(int f) // sets the close background color
|
|
|
{
|
|
{
|
|
|
bgClosingFarbe = f;
|
|
bgClosingFarbe = f;
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Schliessen Hintergrund Bild --
|
|
|
|
|
-void Fenster::setSBgBild(Bild* b) // setzt das Schliess Hintergrund Bild
|
|
|
|
|
|
|
+// -- Close Background Image --
|
|
|
|
|
+void Fenster::setSBgBild(Bild* b) // sets the close background image
|
|
|
{
|
|
{
|
|
|
if (!bgClosingBild) bgClosingBild = new Bild();
|
|
if (!bgClosingBild) bgClosingBild = new Bild();
|
|
|
bgClosingBild->neuBild(b->getBreite(), b->getHeight(), 0);
|
|
bgClosingBild->neuBild(b->getBreite(), b->getHeight(), 0);
|
|
@@ -1610,40 +1607,37 @@ void Fenster::setSBgBildZ(Bild* b)
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Schliessen AlphaFeld --
|
|
|
|
|
-void Fenster::setSAlphaFeldZ(AlphaFeld* af) // setzt das Schliess AlphaFeld
|
|
|
|
|
|
|
+// -- Close AlphaFeld --
|
|
|
|
|
+void Fenster::setSAlphaFeldZ(AlphaFeld* af) // sets the close AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (closeBuffer) closeBuffer->release();
|
|
if (closeBuffer) closeBuffer->release();
|
|
|
closeBuffer = af;
|
|
closeBuffer = af;
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setSAfFarbe(int f) // setzt die Farbe des Schliess AlphaFeldes
|
|
|
|
|
|
|
+void Fenster::setSAfFarbe(int f) // sets the color of the close AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!closeBuffer) closeBuffer = new AlphaFeld();
|
|
if (!closeBuffer) closeBuffer = new AlphaFeld();
|
|
|
closeBuffer->setFarbe(f);
|
|
closeBuffer->setFarbe(f);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setSAfStrength(
|
|
|
|
|
- int st) // setzt die Staerke des Schliess AlphaFeldes
|
|
|
|
|
|
|
+void Fenster::setSAfStrength(int st) // sets the strength of the close AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!closeBuffer) closeBuffer = new AlphaFeld();
|
|
if (!closeBuffer) closeBuffer = new AlphaFeld();
|
|
|
closeBuffer->setStrength(st);
|
|
closeBuffer->setStrength(st);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Schliessen Klick AlphaFeld --
|
|
|
|
|
-void Fenster::setSKAlphaFeldZ(
|
|
|
|
|
- AlphaFeld* af) // setzt das Schliess klick AlphaFeld
|
|
|
|
|
|
|
+// -- Close Click AlphaFeld --
|
|
|
|
|
+void Fenster::setSKAlphaFeldZ(AlphaFeld* af) // sets the close click AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (closeKlickBuffer) closeKlickBuffer->release();
|
|
if (closeKlickBuffer) closeKlickBuffer->release();
|
|
|
closeKlickBuffer = af;
|
|
closeKlickBuffer = af;
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setSKAfFarbe(
|
|
|
|
|
- int f) // setzt die Farbe des Schliess klick AlphaFeldes
|
|
|
|
|
|
|
+void Fenster::setSKAfFarbe(int f) // sets the color of the close click AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!closeKlickBuffer) closeKlickBuffer = new AlphaFeld();
|
|
if (!closeKlickBuffer) closeKlickBuffer = new AlphaFeld();
|
|
|
closeKlickBuffer->setFarbe(f);
|
|
closeKlickBuffer->setFarbe(f);
|
|
@@ -1651,7 +1645,7 @@ void Fenster::setSKAfFarbe(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void Fenster::setSKAfStrength(
|
|
void Fenster::setSKAfStrength(
|
|
|
- int st) // setzt die Staerke des Schliess klick AlphaFeldes
|
|
|
|
|
|
|
+ int st) // sets the strength of the close click AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!closeKlickBuffer) closeKlickBuffer = new AlphaFeld();
|
|
if (!closeKlickBuffer) closeKlickBuffer = new AlphaFeld();
|
|
|
closeKlickBuffer->setStrength(st);
|
|
closeKlickBuffer->setStrength(st);
|
|
@@ -1659,7 +1653,7 @@ void Fenster::setSKAfStrength(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// -- min max --
|
|
// -- min max --
|
|
|
-void Fenster::setMin(int mx, int my) // setzt die Mindest Fenster Groesse
|
|
|
|
|
|
|
+void Fenster::setMin(int mx, int my) // sets the minimum window size
|
|
|
{
|
|
{
|
|
|
min.x = mx;
|
|
min.x = mx;
|
|
|
min.y = my;
|
|
min.y = my;
|
|
@@ -1670,7 +1664,7 @@ void Fenster::setMin(const Punkt& min)
|
|
|
this->min = min;
|
|
this->min = min;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setMax(int mx, int my) // setzt die Maximale Fenster Groesse
|
|
|
|
|
|
|
+void Fenster::setMax(int mx, int my) // sets the maximum window size
|
|
|
{
|
|
{
|
|
|
max.x = mx;
|
|
max.x = mx;
|
|
|
max.y = my;
|
|
max.y = my;
|
|
@@ -1681,7 +1675,7 @@ void Fenster::setMax(const Punkt& max)
|
|
|
this->max = max;
|
|
this->max = max;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setKMin(int mx, int my) // setzt die Mindest Koerper Groesse
|
|
|
|
|
|
|
+void Fenster::setKMin(int mx, int my) // sets the minimum body size
|
|
|
{
|
|
{
|
|
|
kMin.x = mx;
|
|
kMin.x = mx;
|
|
|
kMin.y = my;
|
|
kMin.y = my;
|
|
@@ -1692,7 +1686,7 @@ void Fenster::setKMin(const Punkt& min)
|
|
|
kMin = min;
|
|
kMin = min;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setKMax(int mx, int my) // setzt die Maximale Koerper Groesse
|
|
|
|
|
|
|
+void Fenster::setKMax(int mx, int my) // sets the maximum body size
|
|
|
{
|
|
{
|
|
|
kMax.x = mx;
|
|
kMax.x = mx;
|
|
|
kMax.y = my;
|
|
kMax.y = my;
|
|
@@ -1705,7 +1699,7 @@ void Fenster::setKMax(const Punkt& max)
|
|
|
|
|
|
|
|
// -- scroll --
|
|
// -- scroll --
|
|
|
void Fenster::setHScrollBarZ(
|
|
void Fenster::setHScrollBarZ(
|
|
|
- HScrollBar* hScroll) // setzt die Horizontale Scroll Bar
|
|
|
|
|
|
|
+ HScrollBar* hScroll) // sets the horizontal scroll bar
|
|
|
{
|
|
{
|
|
|
if (this->hScroll) this->hScroll->release();
|
|
if (this->hScroll) this->hScroll->release();
|
|
|
this->hScroll = hScroll;
|
|
this->hScroll = hScroll;
|
|
@@ -1713,14 +1707,14 @@ void Fenster::setHScrollBarZ(
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void Fenster::setVScrollBarZ(
|
|
void Fenster::setVScrollBarZ(
|
|
|
- VScrollBar* vScroll) // setzt die Vertikale Scroll BAr
|
|
|
|
|
|
|
+ VScrollBar* vScroll) // sets the vertical scroll bar
|
|
|
{
|
|
{
|
|
|
if (this->vScroll) this->vScroll->release();
|
|
if (this->vScroll) this->vScroll->release();
|
|
|
this->vScroll = vScroll;
|
|
this->vScroll = vScroll;
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setHSBMax(int max) // setzt das Scroll Maximum
|
|
|
|
|
|
|
+void Fenster::setHSBMax(int max) // sets the scroll maximum
|
|
|
{
|
|
{
|
|
|
if (!hScroll) hScroll = new HScrollBar();
|
|
if (!hScroll) hScroll = new HScrollBar();
|
|
|
int rbr = 0;
|
|
int rbr = 0;
|
|
@@ -1744,7 +1738,7 @@ void Fenster::setVSBMax(int max)
|
|
|
rend = 1;
|
|
rend = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::setHSBScroll(int scroll) // setzt die momentane Scroll Position
|
|
|
|
|
|
|
+void Fenster::setHSBScroll(int scroll) // sets the current scroll position
|
|
|
{
|
|
{
|
|
|
if (!hScroll) hScroll = new HScrollBar();
|
|
if (!hScroll) hScroll = new HScrollBar();
|
|
|
hScroll->scroll(scroll);
|
|
hScroll->scroll(scroll);
|
|
@@ -1775,7 +1769,7 @@ void Framework::Fenster::updateVScroll()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// -- Members --
|
|
// -- Members --
|
|
|
-void Fenster::addMember(Zeichnung* obj) // fuegt einen Member hinzu
|
|
|
|
|
|
|
+void Fenster::addMember(Zeichnung* obj) // adds a member
|
|
|
{
|
|
{
|
|
|
members->add(obj);
|
|
members->add(obj);
|
|
|
rend = 1;
|
|
rend = 1;
|
|
@@ -1788,7 +1782,7 @@ void Framework::Fenster::setMemberIndex(Zeichnung* zMember, int index)
|
|
|
members->setPosition(currentIndex, index);
|
|
members->setPosition(currentIndex, index);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Fenster::removeMember(Zeichnung* zObj) // entfernt einen Member
|
|
|
|
|
|
|
+void Fenster::removeMember(Zeichnung* zObj) // removes a member
|
|
|
{
|
|
{
|
|
|
for (int i = 0; i < members->getEintragAnzahl(); i++)
|
|
for (int i = 0; i < members->getEintragAnzahl(); i++)
|
|
|
{
|
|
{
|
|
@@ -1848,7 +1842,7 @@ void Fenster::doTastaturEreignis(TastaturEreignis& te)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// -- Render --
|
|
// -- Render --
|
|
|
-void Fenster::render(Bild& zRObj) // zeichent nach zRObj
|
|
|
|
|
|
|
+void Fenster::render(Bild& zRObj) // draws to zRObj
|
|
|
{
|
|
{
|
|
|
if (hatStyle(Style::Sichtbar))
|
|
if (hatStyle(Style::Sichtbar))
|
|
|
{
|
|
{
|
|
@@ -1998,13 +1992,13 @@ void Fenster::render(Bild& zRObj) // zeichent nach zRObj
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// constant
|
|
// constant
|
|
|
-// Gibt die Breite des Innenraumes in der Zeichnung in Pixeln zurueck
|
|
|
|
|
|
|
+// Returns the width of the interior area of the drawing in pixels
|
|
|
int Fenster::getInnenBreite() const
|
|
int Fenster::getInnenBreite() const
|
|
|
{
|
|
{
|
|
|
return getBreite() - 2 * getRBreite();
|
|
return getBreite() - 2 * getRBreite();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// Gibt die Hoehe des Innenraumes in der Zeichnung in Pixeln zurueck
|
|
|
|
|
|
|
+// Returns the height of the interior area of the drawing in pixels
|
|
|
int Fenster::getInnenHeight() const
|
|
int Fenster::getInnenHeight() const
|
|
|
{
|
|
{
|
|
|
int th = 0;
|
|
int th = 0;
|
|
@@ -2012,8 +2006,8 @@ int Fenster::getInnenHeight() const
|
|
|
return getHeight() - 2 * getRBreite() - th;
|
|
return getHeight() - 2 * getRBreite() - th;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Rahmen --
|
|
|
|
|
-Rahmen* Fenster::getRahmen() const // gibt den Rahmen zurueck
|
|
|
|
|
|
|
+// -- Border --
|
|
|
|
|
+Rahmen* Fenster::getRahmen() const // returns the border
|
|
|
{
|
|
{
|
|
|
if (!rahmen) return 0;
|
|
if (!rahmen) return 0;
|
|
|
return dynamic_cast<Rahmen*>(rahmen->getThis());
|
|
return dynamic_cast<Rahmen*>(rahmen->getThis());
|
|
@@ -2024,20 +2018,20 @@ Rahmen* Fenster::zRahmen() const
|
|
|
return rahmen;
|
|
return rahmen;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int Fenster::getRFarbe() const // gibt die Farbe des Rahmens zurueck
|
|
|
|
|
|
|
+int Fenster::getRFarbe() const // returns the border color
|
|
|
{
|
|
{
|
|
|
if (!rahmen) return 0;
|
|
if (!rahmen) return 0;
|
|
|
return rahmen->getFarbe();
|
|
return rahmen->getFarbe();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int Fenster::getRBreite() const // gibt die breite des Rahmens zurueck
|
|
|
|
|
|
|
+int Fenster::getRBreite() const // returns the border width
|
|
|
{
|
|
{
|
|
|
if (!rahmen || hatStyleNicht(Style::Rahmen)) return 0;
|
|
if (!rahmen || hatStyleNicht(Style::Rahmen)) return 0;
|
|
|
return rahmen->getRBreite();
|
|
return rahmen->getRBreite();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Titel --
|
|
|
|
|
-Text* Fenster::getTitel() const // gibt den Titel zurueck
|
|
|
|
|
|
|
+// -- Title --
|
|
|
|
|
+Text* Fenster::getTitel() const // returns the title
|
|
|
{
|
|
{
|
|
|
if (!titel) return 0;
|
|
if (!titel) return 0;
|
|
|
return titel->getText();
|
|
return titel->getText();
|
|
@@ -2049,7 +2043,7 @@ Text* Fenster::zTitel() const
|
|
|
return titel->zText();
|
|
return titel->zText();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-TextFeld* Fenster::getTTextFeld() const // gibt das Titel TextFeld zurueck
|
|
|
|
|
|
|
+TextFeld* Fenster::getTTextFeld() const // returns the title text field
|
|
|
{
|
|
{
|
|
|
if (!titel) return 0;
|
|
if (!titel) return 0;
|
|
|
return dynamic_cast<TextFeld*>(titel->getThis());
|
|
return dynamic_cast<TextFeld*>(titel->getThis());
|
|
@@ -2060,8 +2054,8 @@ TextFeld* Fenster::zTTextFeld() const
|
|
|
return titel;
|
|
return titel;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Titel Schrift --
|
|
|
|
|
-Schrift* Fenster::getTSchrift() const // gibt die Titel Schrift zurueck
|
|
|
|
|
|
|
+// -- Title Font --
|
|
|
|
|
+Schrift* Fenster::getTSchrift() const // returns the title font
|
|
|
{
|
|
{
|
|
|
if (!titel) return 0;
|
|
if (!titel) return 0;
|
|
|
return titel->getSchrift();
|
|
return titel->getSchrift();
|
|
@@ -2073,27 +2067,27 @@ Schrift* Fenster::zTSchrift() const
|
|
|
return titel->zSchrift();
|
|
return titel->zSchrift();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int Fenster::getTSFarbe() const // gibt die Titel Schrift Farbe zurueck
|
|
|
|
|
|
|
+int Fenster::getTSFarbe() const // returns the title font color
|
|
|
{
|
|
{
|
|
|
if (!titel) return 0;
|
|
if (!titel) return 0;
|
|
|
return titel->getSchriftFarbe();
|
|
return titel->getSchriftFarbe();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int Fenster::getTSSize() const // gibt die Titel Schrift Groesse zurueck
|
|
|
|
|
|
|
+int Fenster::getTSSize() const // returns the title font size
|
|
|
{
|
|
{
|
|
|
if (!titel) return 0;
|
|
if (!titel) return 0;
|
|
|
return titel->getSchriftSize();
|
|
return titel->getSchriftSize();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Titel Hintergrund --
|
|
|
|
|
-int Fenster::getTBgFarbe() const // gibt die Titel Hintergrund Farbe zurueck
|
|
|
|
|
|
|
+// -- Title Background --
|
|
|
|
|
+int Fenster::getTBgFarbe() const // returns the title background color
|
|
|
{
|
|
{
|
|
|
if (!titel) return 0;
|
|
if (!titel) return 0;
|
|
|
return titel->getHintergrundFarbe();
|
|
return titel->getHintergrundFarbe();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Titel AlphaFeld --
|
|
|
|
|
-AlphaFeld* Fenster::getTAlphaFeld() const // gibt das Titel AlphaFeld zurueck
|
|
|
|
|
|
|
+// -- Title AlphaFeld --
|
|
|
|
|
+AlphaFeld* Fenster::getTAlphaFeld() const // returns the title AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!titel) return 0;
|
|
if (!titel) return 0;
|
|
|
return titel->getAlphaFeld();
|
|
return titel->getAlphaFeld();
|
|
@@ -2105,21 +2099,21 @@ AlphaFeld* Fenster::zTAlphaFeld() const
|
|
|
return titel->zAlphaFeld();
|
|
return titel->zAlphaFeld();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int Fenster::getTAfFarbe() const // gibt die Farbe des Titel AlphaFeldes zurueck
|
|
|
|
|
|
|
+int Fenster::getTAfFarbe() const // returns the color of the title AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!titel) return 0;
|
|
if (!titel) return 0;
|
|
|
return titel->getAlphaFeldFarbe();
|
|
return titel->getAlphaFeldFarbe();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int Fenster::getTAfStrength()
|
|
int Fenster::getTAfStrength()
|
|
|
- const // gibt die Staerke des TitelAlphaFeldes zurueck
|
|
|
|
|
|
|
+ const // returns the strength of the title AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!titel) return 0;
|
|
if (!titel) return 0;
|
|
|
return titel->getAlphaFeldStrength();
|
|
return titel->getAlphaFeldStrength();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Titel Hintergrund Bild --
|
|
|
|
|
-Bild* Fenster::getTBgBild() const // gibt das Titel Hintergrund Bild zurueck
|
|
|
|
|
|
|
+// -- Title Background Image --
|
|
|
|
|
+Bild* Fenster::getTBgBild() const // returns the title background image
|
|
|
{
|
|
{
|
|
|
if (!titel) return 0;
|
|
if (!titel) return 0;
|
|
|
return titel->getHintergrundBild();
|
|
return titel->getHintergrundBild();
|
|
@@ -2131,8 +2125,8 @@ Bild* Fenster::zTBgBild() const
|
|
|
return titel->zHintergrundBild();
|
|
return titel->zHintergrundBild();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Titel Rahmen --
|
|
|
|
|
-Rahmen* Fenster::getTRahmen() const // gibt den Titel Rahmen zurueck
|
|
|
|
|
|
|
+// -- Title Border --
|
|
|
|
|
+Rahmen* Fenster::getTRahmen() const // returns the title border
|
|
|
{
|
|
{
|
|
|
if (!titel) return 0;
|
|
if (!titel) return 0;
|
|
|
return titel->getRahmen();
|
|
return titel->getRahmen();
|
|
@@ -2144,26 +2138,26 @@ Rahmen* Fenster::zTRahmen() const
|
|
|
return titel->zRahmen();
|
|
return titel->zRahmen();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int Fenster::getTRFarbe() const // gibt die Farbe des Titel Rahmens zurueck
|
|
|
|
|
|
|
+int Fenster::getTRFarbe() const // returns the title border color
|
|
|
{
|
|
{
|
|
|
if (!titel) return 0;
|
|
if (!titel) return 0;
|
|
|
return titel->getRahmenFarbe();
|
|
return titel->getRahmenFarbe();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int Fenster::getTRBreite() const // gibt die Breite des Titel Rahmens zurueck
|
|
|
|
|
|
|
+int Fenster::getTRBreite() const // returns the title border width
|
|
|
{
|
|
{
|
|
|
if (!titel) return 0;
|
|
if (!titel) return 0;
|
|
|
return titel->getRahmenBreite();
|
|
return titel->getRahmenBreite();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Koerper Hintergrund --
|
|
|
|
|
-int Fenster::getKBgFarbe() const // gibt die Koerper Hintergrund Farbe zurueck
|
|
|
|
|
|
|
+// -- Body Background --
|
|
|
|
|
+int Fenster::getKBgFarbe() const // returns the body background color
|
|
|
{
|
|
{
|
|
|
return bgBodyColor;
|
|
return bgBodyColor;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Koerper Hintergrund Bild --
|
|
|
|
|
-Bild* Fenster::getKBgBild() const // gibt das Koerper Hintergrund Bild zurueck
|
|
|
|
|
|
|
+// -- Body Background Image --
|
|
|
|
|
+Bild* Fenster::getKBgBild() const // returns the body background image
|
|
|
{
|
|
{
|
|
|
if (!bgBodyPicture) return 0;
|
|
if (!bgBodyPicture) return 0;
|
|
|
return dynamic_cast<Bild*>(bgBodyPicture->getThis());
|
|
return dynamic_cast<Bild*>(bgBodyPicture->getThis());
|
|
@@ -2174,8 +2168,8 @@ Bild* Fenster::zKBgBild() const
|
|
|
return bgBodyPicture;
|
|
return bgBodyPicture;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Koerper AlphaFeld --
|
|
|
|
|
-AlphaFeld* Fenster::getKAlphaFeld() const // gibt das Koerper AlphaFeld zurueck
|
|
|
|
|
|
|
+// -- Body AlphaFeld --
|
|
|
|
|
+AlphaFeld* Fenster::getKAlphaFeld() const // returns the body AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!bodyBuffer) return 0;
|
|
if (!bodyBuffer) return 0;
|
|
|
return dynamic_cast<AlphaFeld*>(bodyBuffer->getThis());
|
|
return dynamic_cast<AlphaFeld*>(bodyBuffer->getThis());
|
|
@@ -2186,27 +2180,27 @@ AlphaFeld* Fenster::zKAlphaFeld() const
|
|
|
return bodyBuffer;
|
|
return bodyBuffer;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int Fenster::getKAfFarbe() const // gibt die Farbe des Koerper AlphaFeldes zurueck
|
|
|
|
|
|
|
+int Fenster::getKAfFarbe() const // returns the body AlphaFeld color
|
|
|
{
|
|
{
|
|
|
if (!bodyBuffer) return 0;
|
|
if (!bodyBuffer) return 0;
|
|
|
return bodyBuffer->getFarbe();
|
|
return bodyBuffer->getFarbe();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int Fenster::getKAfStrength()
|
|
int Fenster::getKAfStrength()
|
|
|
- const // gibt die Staerke des Koerper AlphaFeldes zurueck
|
|
|
|
|
|
|
+ const // returns the strength of the body AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!bodyBuffer) return 0;
|
|
if (!bodyBuffer) return 0;
|
|
|
return bodyBuffer->getStrength();
|
|
return bodyBuffer->getStrength();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Schliessen Hintergrund --
|
|
|
|
|
-int Fenster::getSBgFarbe() const // gibt die Schliess Hintergrund Farbe zurueck
|
|
|
|
|
|
|
+// -- Close Background --
|
|
|
|
|
+int Fenster::getSBgFarbe() const // returns the close background color
|
|
|
{
|
|
{
|
|
|
return bgClosingFarbe;
|
|
return bgClosingFarbe;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Schliessen Hintergrund Bild --
|
|
|
|
|
-Bild* Fenster::getSBgBild() const // gibt das Schliess Hintergrund Bild zurueck
|
|
|
|
|
|
|
+// -- Close Background Image --
|
|
|
|
|
+Bild* Fenster::getSBgBild() const // returns the close background image
|
|
|
{
|
|
{
|
|
|
if (!bgClosingBild) return 0;
|
|
if (!bgClosingBild) return 0;
|
|
|
return dynamic_cast<Bild*>(bgClosingBild->getThis());
|
|
return dynamic_cast<Bild*>(bgClosingBild->getThis());
|
|
@@ -2217,8 +2211,8 @@ Bild* Fenster::zSBgBild() const
|
|
|
return bgClosingBild;
|
|
return bgClosingBild;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Schliessen AlphaFeld --
|
|
|
|
|
-AlphaFeld* Fenster::getSAlphaFeld() const // gibt das Schliess AlphaFeld zurueck
|
|
|
|
|
|
|
+// -- Close AlphaFeld --
|
|
|
|
|
+AlphaFeld* Fenster::getSAlphaFeld() const // returns the close AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!closeBuffer) return 0;
|
|
if (!closeBuffer) return 0;
|
|
|
return dynamic_cast<AlphaFeld*>(closeBuffer->getThis());
|
|
return dynamic_cast<AlphaFeld*>(closeBuffer->getThis());
|
|
@@ -2229,23 +2223,21 @@ AlphaFeld* Fenster::zSAlphaFeld() const
|
|
|
return closeBuffer;
|
|
return closeBuffer;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int Fenster::getSAfFarbe()
|
|
|
|
|
- const // gibt die Farbe des Schliess AlphaFeldes zurueck
|
|
|
|
|
|
|
+int Fenster::getSAfFarbe() const // returns the close AlphaFeld color
|
|
|
{
|
|
{
|
|
|
if (!closeBuffer) return 0;
|
|
if (!closeBuffer) return 0;
|
|
|
return closeBuffer->getFarbe();
|
|
return closeBuffer->getFarbe();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int Fenster::getSAfStrength()
|
|
int Fenster::getSAfStrength()
|
|
|
- const // gibt die Staerke des Schliess AlphaFeldes zurueck
|
|
|
|
|
|
|
+ const // returns the strength of the close AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!closeBuffer) return 0;
|
|
if (!closeBuffer) return 0;
|
|
|
return closeBuffer->getStrength();
|
|
return closeBuffer->getStrength();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Schliessen Klick AlphaFeld --
|
|
|
|
|
-AlphaFeld*
|
|
|
|
|
-Fenster::getSKAlphaFeld() const // gibt das Schliess Klick AlphaFeld zurueck
|
|
|
|
|
|
|
+// -- Close Click AlphaFeld --
|
|
|
|
|
+AlphaFeld* Fenster::getSKAlphaFeld() const // returns the close click AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!closeKlickBuffer) return 0;
|
|
if (!closeKlickBuffer) return 0;
|
|
|
return dynamic_cast<AlphaFeld*>(closeKlickBuffer->getThis());
|
|
return dynamic_cast<AlphaFeld*>(closeKlickBuffer->getThis());
|
|
@@ -2256,44 +2248,42 @@ AlphaFeld* Fenster::zSKAlphaFeld() const
|
|
|
return closeKlickBuffer;
|
|
return closeKlickBuffer;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int Fenster::getSKAfFarbe()
|
|
|
|
|
- const // gibt die Farbe des Schliess Klick AlphaFeldes zurueck
|
|
|
|
|
|
|
+int Fenster::getSKAfFarbe() const // returns the close click AlphaFeld color
|
|
|
{
|
|
{
|
|
|
if (!closeKlickBuffer) return 0;
|
|
if (!closeKlickBuffer) return 0;
|
|
|
return closeKlickBuffer->getFarbe();
|
|
return closeKlickBuffer->getFarbe();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int Fenster::getSKAfStrength()
|
|
int Fenster::getSKAfStrength()
|
|
|
- const // gibt die Staerke des Schliess Klick AlphaFeldes zurueck
|
|
|
|
|
|
|
+ const // returns the strength of the close click AlphaFeld
|
|
|
{
|
|
{
|
|
|
if (!closeKlickBuffer) return 0;
|
|
if (!closeKlickBuffer) return 0;
|
|
|
return closeKlickBuffer->getStrength();
|
|
return closeKlickBuffer->getStrength();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// -- min max --
|
|
// -- min max --
|
|
|
-const Punkt& Fenster::getMin() const // gibt die minimale Fenstergroesse zurueck
|
|
|
|
|
|
|
+const Punkt& Fenster::getMin() const // returns the minimum window size
|
|
|
{
|
|
{
|
|
|
return min;
|
|
return min;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const Punkt& Fenster::getMax() const // gibt die maximale Fenstergroesse zurueck
|
|
|
|
|
|
|
+const Punkt& Fenster::getMax() const // returns the maximum window size
|
|
|
{
|
|
{
|
|
|
return max;
|
|
return max;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const Punkt& Fenster::getKMin() const // gibt die minimale Fenstergroesse zurueck
|
|
|
|
|
|
|
+const Punkt& Fenster::getKMin() const // returns the minimum body size
|
|
|
{
|
|
{
|
|
|
return kMin;
|
|
return kMin;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const Punkt& Fenster::getKMax() const // gibt die maximale Fenstergroesse zurueck
|
|
|
|
|
|
|
+const Punkt& Fenster::getKMax() const // returns the maximum body size
|
|
|
{
|
|
{
|
|
|
return kMax;
|
|
return kMax;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// -- scroll --
|
|
// -- scroll --
|
|
|
-VScrollBar*
|
|
|
|
|
-Fenster::getVScrollBar() const // gibt die Vertikale Scroll Bar zurueck
|
|
|
|
|
|
|
+VScrollBar* Fenster::getVScrollBar() const // returns the vertical scroll bar
|
|
|
{
|
|
{
|
|
|
if (!vScroll) return 0;
|
|
if (!vScroll) return 0;
|
|
|
return dynamic_cast<VScrollBar*>(vScroll->getThis());
|
|
return dynamic_cast<VScrollBar*>(vScroll->getThis());
|
|
@@ -2304,8 +2294,7 @@ VScrollBar* Fenster::zVScrollBar() const
|
|
|
return vScroll;
|
|
return vScroll;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-HScrollBar*
|
|
|
|
|
-Fenster::getHScrollBar() const // gibt die Horizontale Scroll Bar zurueck
|
|
|
|
|
|
|
+HScrollBar* Fenster::getHScrollBar() const // returns the horizontal scroll bar
|
|
|
{
|
|
{
|
|
|
if (!hScroll) return 0;
|
|
if (!hScroll) return 0;
|
|
|
return dynamic_cast<HScrollBar*>(hScroll->getThis());
|
|
return dynamic_cast<HScrollBar*>(hScroll->getThis());
|
|
@@ -2317,7 +2306,7 @@ HScrollBar* Fenster::zHScrollBar() const
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// -- Members --
|
|
// -- Members --
|
|
|
-const RCArray<Zeichnung>& Fenster::getMembers() const // gibt die Members zurueck
|
|
|
|
|
|
|
+const RCArray<Zeichnung>& Fenster::getMembers() const // returns the members
|
|
|
{
|
|
{
|
|
|
return *members;
|
|
return *members;
|
|
|
}
|
|
}
|
|
@@ -2342,8 +2331,8 @@ int Framework::Fenster::getNeededChildHeight() const
|
|
|
return max;
|
|
return max;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// -- Kopie --
|
|
|
|
|
-Zeichnung* Fenster::dublizieren() const // Erzeugt eine Kopie des Fensters
|
|
|
|
|
|
|
+// -- Copy --
|
|
|
|
|
+Zeichnung* Fenster::dublizieren() const // Creates a copy of the window
|
|
|
{
|
|
{
|
|
|
Fenster* ret = new Fenster();
|
|
Fenster* ret = new Fenster();
|
|
|
ret->setPosition(pos);
|
|
ret->setPosition(pos);
|