mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@11048 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
218c4988cc
commit
61e73007ac
4 changed files with 69 additions and 0 deletions
17
upptst/Spin/Spin.h
Normal file
17
upptst/Spin/Spin.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef _Spin_Spin_h
|
||||
#define _Spin_Spin_h
|
||||
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
#define LAYOUTFILE <Spin/Spin.lay>
|
||||
#include <CtrlCore/lay.h>
|
||||
|
||||
class Spin : public WithSpinLayout<TopWindow> {
|
||||
public:
|
||||
typedef Spin CLASSNAME;
|
||||
Spin();
|
||||
};
|
||||
|
||||
#endif
|
||||
18
upptst/Spin/Spin.lay
Normal file
18
upptst/Spin/Spin.lay
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
LAYOUT(SpinLayout, 768, 500)
|
||||
ITEM(EditIntSpin, int_1, LeftPosZ(12, 160).TopPosZ(12, 19))
|
||||
ITEM(EditInt64Spin, int64_1, LeftPosZ(12, 160).TopPosZ(36, 19))
|
||||
ITEM(EditDoubleSpin, double_1, LeftPosZ(12, 160).TopPosZ(60, 19))
|
||||
ITEM(EditDateSpin, date_1, LeftPosZ(12, 160).TopPosZ(84, 19))
|
||||
ITEM(EditTimeSpin, time_1, LeftPosZ(12, 160).TopPosZ(108, 19))
|
||||
ITEM(EditIntSpin, int_2, LeftPosZ(188, 160).TopPosZ(12, 19))
|
||||
ITEM(EditInt64Spin, int64_2, LeftPosZ(188, 160).TopPosZ(36, 19))
|
||||
ITEM(EditDoubleSpin, double_2, LeftPosZ(188, 160).TopPosZ(60, 19))
|
||||
ITEM(EditDateSpin, date_2, LeftPosZ(188, 160).TopPosZ(84, 19))
|
||||
ITEM(EditTimeSpin, time_2, LeftPosZ(188, 160).TopPosZ(108, 19))
|
||||
ITEM(EditIntSpin, int_3, LeftPosZ(364, 160).TopPosZ(12, 19))
|
||||
ITEM(EditInt64Spin, int64_3, LeftPosZ(364, 160).TopPosZ(36, 19))
|
||||
ITEM(EditDoubleSpin, double_3, LeftPosZ(364, 160).TopPosZ(60, 19))
|
||||
ITEM(EditDateSpin, date_3, LeftPosZ(364, 160).TopPosZ(84, 19))
|
||||
ITEM(EditTimeSpin, time_3, LeftPosZ(364, 160).TopPosZ(108, 19))
|
||||
END_LAYOUT
|
||||
|
||||
11
upptst/Spin/Spin.upp
Normal file
11
upptst/Spin/Spin.upp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
Spin.h,
|
||||
main.cpp,
|
||||
Spin.lay;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
23
upptst/Spin/main.cpp
Normal file
23
upptst/Spin/main.cpp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#include "Spin.h"
|
||||
|
||||
Spin::Spin()
|
||||
{
|
||||
CtrlLayout(*this, "Window title");
|
||||
|
||||
int_2.SetInc(5);
|
||||
int64_2.SetInc(5);
|
||||
double_2.SetInc(5);
|
||||
date_2.SetInc(5);
|
||||
time_2.SetInc(5);
|
||||
|
||||
int_3.RoundFromMin().SetInc(5).Min(3);
|
||||
int64_3.RoundFromMin().SetInc(5).Min(3);
|
||||
double_3.RoundFromMin().SetInc(5).Min(3);
|
||||
date_3.RoundFromMin().SetInc(5).Min(Date(1970, 1, 1));
|
||||
time_3.RoundFromMin().SetInc(5).Min(Time(1970, 1, 1));
|
||||
}
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
Spin().Run();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue