Panda3D
|
00001 // Filename: wordWrapStreamBuf.I 00002 // Created by: drose (01Jul00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 00016 //////////////////////////////////////////////////////////////////// 00017 // Function: WordWrapStreamBuf::set_literal_mode 00018 // Access: Private 00019 // Description: An internal function called to update the internal 00020 // state according to the current value of the 00021 // Notify::literal flag, which might or might not be set 00022 // of the ostream at any time. When the literal flag is 00023 // true, we should not word-wrap, so toggling this flag 00024 // means we need to flush the current buffer. 00025 //////////////////////////////////////////////////////////////////// 00026 INLINE void WordWrapStreamBuf:: 00027 set_literal_mode(bool mode) { 00028 if (mode != _literal_mode) { 00029 flush_data(); 00030 _literal_mode = mode; 00031 } 00032 } 00033