Panda3D
 All Classes Functions Variables Enumerations
wordWrapStreamBuf.I
1 // Filename: wordWrapStreamBuf.I
2 // Created by: drose (01Jul00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: WordWrapStreamBuf::set_literal_mode
18 // Access: Private
19 // Description: An internal function called to update the internal
20 // state according to the current value of the
21 // Notify::literal flag, which might or might not be set
22 // of the ostream at any time. When the literal flag is
23 // true, we should not word-wrap, so toggling this flag
24 // means we need to flush the current buffer.
25 ////////////////////////////////////////////////////////////////////
26 INLINE void WordWrapStreamBuf::
27 set_literal_mode(bool mode) {
28  if (mode != _literal_mode) {
29  flush_data();
30  _literal_mode = mode;
31  }
32 }
33