mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
*Controls4U_Demo: Updated and fixed
git-svn-id: svn://ultimatepp.org/upp/trunk@14150 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ff3ff6be3d
commit
e85cad96bc
4 changed files with 16 additions and 8 deletions
|
|
@ -8,7 +8,7 @@ class EditFileFolder_Demo : public WithEditFileFolder<StaticRect> {
|
|||
public:
|
||||
typedef EditFileFolder_Demo CLASSNAME;
|
||||
EditFileFolder_Demo();
|
||||
void OnNewFile();
|
||||
bool OnNewFile();
|
||||
void ChangeProperties();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public:
|
|||
typedef VLC_Demo CLASSNAME;
|
||||
VLC_Demo();
|
||||
|
||||
void Load();
|
||||
bool Load();
|
||||
void Play();
|
||||
void Pause();
|
||||
void Stop();
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
#include <Controls4U/Controls4U.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
#include <Controls4U/Controls4U.h>
|
||||
|
||||
#if defined(PLATFORM_WIN32)
|
||||
#include "Controls4U_Demo_win.h"
|
||||
|
|
@ -84,13 +84,17 @@ EditFileFolder_Demo::EditFileFolder_Demo() {
|
|||
|
||||
back.Set(Images::paper());
|
||||
}
|
||||
void EditFileFolder_Demo::OnNewFile() {
|
||||
bool EditFileFolder_Demo::OnNewFile() {
|
||||
if (!clipImage.Set(~FileName)) {
|
||||
if (FileExists(~FileName))
|
||||
if (FileExists(~FileName)) {
|
||||
Exclamation("File not found");
|
||||
else
|
||||
return false;
|
||||
} else {
|
||||
Exclamation("File format is not supported");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
void EditFileFolder_Demo::ChangeProperties() {
|
||||
clipImage.SetAngle(~angleList);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
using namespace Upp;
|
||||
|
||||
|
||||
#if defined(PLATFORM_WIN32)
|
||||
|
||||
#include "Controls4U_Demo_win.h"
|
||||
|
|
@ -209,10 +210,13 @@ void VLC_Demo::SwitchOn() {
|
|||
}
|
||||
}
|
||||
|
||||
void VLC_Demo::Load() {
|
||||
if (!player.IsLoaded())
|
||||
bool VLC_Demo::Load() {
|
||||
if (!player.IsLoaded()) {
|
||||
Exclamation("Sorry. ActiveX or program not available");
|
||||
return false;
|
||||
}
|
||||
player.AddTarget(~file);
|
||||
return true;
|
||||
}
|
||||
|
||||
void VLC_Demo::Play() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue