本文整理汇总了C++中FramePtr::get_flags方法的典型用法代码示例。如果您正苦于以下问题:C++ FramePtr::get_flags方法的具体用法?C++ FramePtr::get_flags怎么用?C++ FramePtr::get_flags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FramePtr
的用法示例。
在下文中一共展示了FramePtr::get_flags方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rebuild_lines
ERRORCODE TextFlow::rebuild_lines(FrameObjectPtr object, WORD_RANGE wrange)
{
ERRORCODE error;
DB_RECORD_NUMBER f_record = object->get_frame_record();
FramePtr frame;
DB_RECORD_NUMBER p_record;
ParagraphPtr paragraph;
W_INDEX w_index;
TEXT_WORD_PTR wp;
PCOORD line_top;
LINE_PTR lp;
L_INDEX l_index;
PCOORD frame_extent, frame_left, tab_size;
PCOORD baseline;
BOOL use_white_space;
FLAGS frame_flags;
frame_object = object;
/*
// Text is flowed by placing text words into lines within a frame.
// Words are flowed until the end is reached and then until words stop moving.
*/
if ((frame = (FramePtr)database->get_record(f_record, &error, RECORD_TYPE_Frame)) == NULL)
{
return error;
}
frame_flags = frame->get_flags();
/*
// See if we need to do any stretching.
*/
if (frame_flags & (FRAME_FLAG_stretch_frame | FRAME_FLAG_stretch_text))
{
if (frame_flags & FRAME_FLAG_stretch_frame)
{
SHORT error;
/* Stretch the frame before flowing. */
if ((error = object->stretch_frame()) != 0)
{
frame->release();
if (error > 0)
{
error = ERRORCODE_None;
}
return (ERRORCODE)error;
}
/* Frame did not change size. Flow normally. */
}
#if 0
else
#else
/* Always check (or check, too). */
if (frame_flags & FRAME_FLAG_stretch_text)
#endif
{
/* Stretch the text before flowing. */
if ((error = frame->stretch_text()) != ERRORCODE_None)
{
frame->release();
return error;
}
/* Flow all the text. */
wrange.w_start = wrange.w_end = -1;
}
}
p_record = frame->get_paragraph();
if ((paragraph = (ParagraphPtr)database->get_record(p_record, &error, RECORD_TYPE_Paragraph)) == NULL)
{
frame->release();
return error;
}
/*
// Ascertain the true start and end of the text flow request.
*/
SHORT word_count = paragraph->number_of_words();
if (wrange.w_start < 0)
{
wrange.w_start = 0;
}
if (wrange.w_end < 0)
{
wrange.w_end = word_count-1;
}
//.........这里部分代码省略.........