12#include <owl/listboxview.rh>
13#include <owl/docview.rh>
57 TListBox(parent, GetNextViewId(), 0,0,0,0),
93 if (str.length() == 0)
137 if ((
inStream = Doc->InStream(ios::in)) ==
nullptr) {
176 if (Doc->GetDocPath() ==
nullptr) {
192 if (!
force && !DirtyFlag)
202 for (
int index = 0; index < count-1; index++) {
228 if (!clear && Doc->GetDocPath() !=
nullptr)
257#if defined(BI_MSG_LANGUAGE) && BI_MSG_LANGUAGE == 0x0411
289 if (
cb.EmptyClipboard()) {
369static int linePrompt(
TWindow* parent,
int index,
UINT id,
411 if (index == count-1) {
445#if OWL_PERSISTENT_STREAMS
455 is >> GetObject()->Origin;
463TListBoxView::Streamer::Write(opstream &
os)
const
467 os << GetObject()->Origin;
#define DIAG_DECLARE_GROUP(group)
A device context class derived from TWindowDC, TClientDC provides access to the client area owned by ...
The clipboard class encapsulates the methods for the clipboard object of Windows.
auto Execute() -> int override
Creates and executes a modal dialog box interface element associated with the TDialog object.
An abstract base class, TDocument is the base class for all document objects and serves as an interfa...
An interface object that represents a corresponding list box element.
tstring GetSelString() const
String-aware overload.
virtual int SetSelIndex(int index)
For single-selection list boxes.
virtual void SetHorizontalExtent(int horzExtent)
Sets the number of pixels by which the list box can be scrolled horizontally.
virtual int AddString(LPCTSTR str)
Adds str to the list box, returning its position in the list (0 is the first position).
virtual int GetStringLen(int index) const
Returns the string length (excluding the terminating NULL) of the item at the position index supplied...
virtual int SetTopIndex(int index)
The system scrolls the list box contents so that either the specified item appears at the top of the ...
virtual int InsertString(LPCTSTR str, int index)
Inserts str in the list box at the position supplied in index, and returns the item's actual position...
virtual int GetCount() const
Returns the number of items in the list box, or a negative value if an error occurs.
virtual int DeleteString(int index)
Deletes the item in the list at the position (starting at 0) supplied in index.
virtual void ClearList()
Clears all the entries in the associated listbox.
virtual int GetTopIndex() const
Returns the index of the first item displayed at the top of the list box.
virtual int GetString(TCHAR *str, int index) const
Retrieves the contents of the string at the passed index of the associated listbox.
virtual int GetSelIndex() const
For single-selection list boxes.
Provides views for list boxes.
bool LoadData(int top, int sel)
Reads the view from the stream and closes the file.
bool VnDocClosed(int omode)
Indicates that the document has been closed.
void CmEditClear()
Automatically responds to a menu selection with a menu ID of CM_EDITCLEAR by clearing the items in th...
void CmEditCopy()
Automatically responds to a menu selection with a menu ID of CM_EDITCOPY and copies the selected text...
void SetExtent(const tstring &str)
Sets the maximum horizontal extent for the list view window.
void CmEditAdd()
Automatically responds to CM_LISTADD message by getting the length of the input string and inserting ...
void CmEditItem()
Automatically responds to a CM_LISTEDIT message by getting the input text and inserting the text into...
auto AddString(LPCTSTR) -> int override
< String-aware overload
void CmEditCut()
Automatically responds to a menu selection with a menu ID of CM_EDITCUT by calling CmEditCopy and CmE...
bool VnRevert(bool clear)
Indicates if changes made to the view should be erased, and if the data from the document should be r...
void CmSelChange()
Automatically responds to a LBN_SELCHANGE message (which indicates that the contents of the list view...
void CmEditPaste()
Automatically responds to a menu selection with a menu ID of CM_EDITPASTE by inserting text into the ...
TListBoxView(TDocument &doc, TWindow *parent=0)
Creates a TListBoxView object associated with the specified document and parent window.
void CmEditDelete()
Automatically responds to a menu selection with a menu ID of CM_EDITDELETE by deleting the currently ...
void CmEditUndo()
Handler to undo the last operation performed on the underlying ListBox.
bool VnCommit(bool force)
Commits changes made in the view to the document.
uint EvGetDlgCode(const MSG *)
Overrides TWindow's response to a WM_GETDLGCODE message (an input procedure associated with a control...
auto Create() -> bool override
Overrides TWindow::Create and creates the view's window.
The tagSIZE struct is defined as.
Abstract base class for view access from document.
void SetViewMenu(TMenuDescr *menu)
void NotOK()
To flag errors in creation.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
tstring LoadString(uint id) const
virtual bool Create()
Creates the window interface element to be associated with this ObjectWindows interface element.
long GetWindowLong(int index) const
Retrieves information about the window depending on the value stored in index.
TModule * GetModule() const
Returns a pointer to the module object.
TResult DefaultProcessing()
Handles default processing of events, which includes continued processing of menu/accelerators comman...
int MessageBox(LPCTSTR text, LPCTSTR caption=0, uint flags=MB_OK) const
Creates and displays a message box that contains a message (text), a title (caption),...
TXOwl is root class of the ObjectWindows exception hierarchy.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
void ReadBaseObject(Base *base, ipstream &in)
#define IMPLEMENT_STREAMABLE2(cls, base1, base2)
void WriteBaseObject(Base *base, opstream &out)
@ ofWrite
ios::out, open for writing
Definition of class TListBoxView.
Object Windows Library (OWLNext Core)
const tchar VirtualLastLineStr[]
#define COUNTOF(s)
Array element count Important: Only use this with an argument of array type.
#define EV_NOTIFY_AT_CHILD(notifyCode, method)
Response table entry for a child ID notification handled at the child.
#define EV_COMMAND(id, method)
Response table entry for a menu/accelerator/push button message.