VNoticeDialog: Difference between revisions
Appearance
mNo edit summary |
|||
Line 2: | Line 2: | ||
==Synopsis== | ==Synopsis== | ||
; '''Header:''' | ; '''Header:''' | ||
: <tt> | : <tt><v/vnotice.h></tt> | ||
; '''Class name:''' | ; '''Class name:''' | ||
: vNoticeDialog | : vNoticeDialog | ||
; '''Hierarchy:''' | ; '''Hierarchy:''' | ||
: | : vModalDialog ->vNoticeDialog | ||
==Description== | ==Description== | ||
This simple utility class can be used to display a simple message to the user. The utility displays the message, and then waits for the user to enter to press OK. | This simple utility class can be used to display a simple message to the user. The utility displays the message, and then waits for the user to enter to press OK. | ||
Line 19: | Line 17: | ||
====vNoticeDialog(vApp* app)==== | ====vNoticeDialog(vApp* app)==== | ||
The <tt>vNoticeDialog</tt> constructor requires a pointer to a <tt>vBaseWindow</tt>, which includes all '''''V''''' windows and dialogs, or a pointer to the <tt>vApp</tt> object. You will usually pass the <tt>this</tt> to the constructor. | The <tt>vNoticeDialog</tt> constructor requires a pointer to a <tt>vBaseWindow</tt>, which includes all '''''V''''' windows and dialogs, or a pointer to the <tt>vApp</tt> object. You will usually pass the <tt>this</tt> to the constructor. | ||
====void Notice(const char* prompt)==== | ====void Notice(const char* prompt)==== | ||
You provide a <tt>prompt</tt> for the user. If the message contains 'backslashn' newlines, it will be shown on multiple lines. | You provide a <tt>prompt</tt> for the user. If the message contains 'backslashn' newlines, it will be shown on multiple lines. | ||
===Example=== | ===Example=== | ||
The following is a simple example of using <tt>vNoticeDialog</tt>. | The following is a simple example of using <tt>vNoticeDialog</tt>. | ||
[[Image:v-gui-notice.gif]] | [[Image:v-gui-notice.gif]] | ||
#include <v/vnotice.h> | #include <v/vnotice.h> | ||
... | ... | ||
Line 39: | Line 33: | ||
(void)note.Notice("This is a notice."); | (void)note.Notice("This is a notice."); | ||
[[Category: | [[Category:V C++ GUI Framework]] |
Revision as of 18:30, 1 March 2017
A utility class to display a message.
Synopsis
- Header:
- <v/vnotice.h>
- Class name:
- vNoticeDialog
- Hierarchy:
- vModalDialog ->vNoticeDialog
Description
This simple utility class can be used to display a simple message to the user. The utility displays the message, and then waits for the user to enter to press OK.
New Methods
vNoticeDialog(vBaseWindow* win)
vNoticeDialog(vApp* app)
The vNoticeDialog constructor requires a pointer to a vBaseWindow, which includes all V windows and dialogs, or a pointer to the vApp object. You will usually pass the this to the constructor.
void Notice(const char* prompt)
You provide a prompt for the user. If the message contains 'backslashn' newlines, it will be shown on multiple lines.
Example
The following is a simple example of using vNoticeDialog.
#include <v/vnotice.h> ... vNoticeDialog note(this); // instantiate a notice (void)note.Notice("This is a notice.");