Coverage Report

Created: 2026-11-12 06:13

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wxwidgets/include/wx/memtext.h
Line
Count
Source
1
///////////////////////////////////////////////////////////////////////////////
2
// Name:        wx/memtext.h
3
// Purpose:     wxMemoryText allows to use wxTextBuffer without a file
4
// Created:     14.11.01
5
// Author:      Morten Hanssen
6
// Copyright:   (c) 2001 Morten Hanssen
7
// Licence:     wxWindows licence
8
///////////////////////////////////////////////////////////////////////////////
9
10
#ifndef _WX_MEMTEXT_H
11
#define _WX_MEMTEXT_H
12
13
#include "wx/defs.h"
14
15
// there is no separate setting for wxMemoryText, it's smallish anyhow
16
#if wxUSE_TEXTBUFFER
17
18
#include "wx/strconv.h"
19
#include "wx/textbuf.h"
20
21
// ----------------------------------------------------------------------------
22
// wxMemoryText
23
// ----------------------------------------------------------------------------
24
25
class WXDLLIMPEXP_BASE wxMemoryText : public wxTextBuffer
26
{
27
public:
28
    // Constructors.
29
2.33k
    wxMemoryText() = default;
30
0
    wxMemoryText(const wxString& name) : wxTextBuffer(name) { }
31
32
protected:
33
    virtual bool OnExists() const override
34
0
        { return false; }
35
36
    virtual bool OnOpen(const wxString & WXUNUSED(strBufferName),
37
                        wxTextBufferOpenMode WXUNUSED(OpenMode)) override
38
0
        { return true; }
39
40
    virtual bool OnClose() override
41
0
        { return true; }
42
43
    virtual bool OnRead(const wxMBConv& WXUNUSED(conv)) override
44
0
        { return true; }
45
46
    virtual bool OnWrite(wxTextFileType WXUNUSED(typeNew),
47
                         const wxMBConv& WXUNUSED(conv) = wxMBConvUTF8()) override
48
0
        { return true; }
49
50
private:
51
    wxDECLARE_NO_COPY_CLASS(wxMemoryText);
52
};
53
54
#endif // wxUSE_TEXTBUFFER
55
56
#endif // _WX_MEMTEXT_H
57