mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-24 14:22:40 -06:00
.reference
git-svn-id: svn://ultimatepp.org/upp/trunk@7726 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
f01899f18a
commit
dbcb75c8e7
3 changed files with 34 additions and 1 deletions
|
|
@ -30,7 +30,8 @@ void App::Work()
|
|||
break;
|
||||
if(list.GetCount() > 100) {
|
||||
bool quit;
|
||||
Call(PTEBACK1(AskQuit, &quit));
|
||||
Call(PTEBACK1(AskQuit, &quit)); // This is the generic way for any GUI (dlg)
|
||||
// quit = PromptYesNo("Quit?"); // But Prompt has this ability already implemented
|
||||
if(quit) {
|
||||
Break();
|
||||
return;
|
||||
|
|
|
|||
11
reference/PromptRedirect/PromptRedirect.upp
Normal file
11
reference/PromptRedirect/PromptRedirect.upp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
description "Prompt redirection\377";
|
||||
|
||||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI SSE2";
|
||||
|
||||
21
reference/PromptRedirect/main.cpp
Normal file
21
reference/PromptRedirect/main.cpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
int MyPrompt(Callback1<const String&> WhenLink,
|
||||
const char *title, const Image& iconbmp, const char *qtf, bool okcancel,
|
||||
const char *button1, const char *button2, const char *button3,
|
||||
int cx, Image im1, Image im2, Image im3)
|
||||
{
|
||||
LOG(title << ": " << qtf << "\n");
|
||||
return IDCANCEL;
|
||||
}
|
||||
|
||||
INITBLOCK {
|
||||
RedirectPrompts(MyPrompt);
|
||||
}
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
PromptYesNo("Test");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue