20#define BOOST_TEST_NO_MAIN
21#include <boost/test/unit_test.hpp>
47 BOOST_CHECK( st.
bold );
62 BOOST_CHECK( m.
Entries()[0].preview );
76 BOOST_CHECK( !m.
Entries()[0].preview );
85 BOOST_CHECK( m.
Entries()[0].preview );
90 BOOST_CHECK( !m.
Entries()[0].preview );
129 BOOST_CHECK( !m.
Entries()[1].preview );
GUI-free preview/dirty/close state machine.
const std::vector< ENTRY > & Entries() const
int PreviewIndex() const
Index of the current reusable preview tab, or -1 if none.
bool CanCloseWithoutPrompt(const wxString &aKey) const
True when the document has no unsaved edits and can be closed silently.
void Promote(const wxString &aKey)
Clear the preview flag so the tab becomes permanent and is no longer reused.
void MarkModified(const wxString &aKey, bool aModified)
Update the modified flag.
int OpenDocument(const wxString &aKey, bool aAsPreview)
Return the index to display the document at, reusing a preview slot or appending a new tab.
void CloseDocument(const wxString &aKey)
Drop the document with aKey, freeing the preview slot if it held it.
TAB_VISUAL_STATE ResolveTabVisualState(bool aPreview, bool aModified)
Resolve a tab's decorations from its document state flags.
Visual decorations derived from document state: preview is italic, modified is bold with a leading as...
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_CASE(TabVisualState)
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_EQUAL(result, "25.4")