示例#1
0
// ------------------------------------------------------------------------- RHTML_text_view - RHTMLtextview -
RHTMLtextview::RHTMLtextview(BRect fRect, RHTMLtext *target, uint ft): BTextView(fRect,"fTextView",BRect(3,3,fRect.right-32,fRect.bottom-fRect.top),B_FOLLOW_ALL,B_WILL_DRAW)
{
 SetWordWrap(fOptions->WordWrap);
 fFont=new BFont(fOptions->DefaultFont);
 fTarget=target;
 fUpdateTimer = new RTimer("TextViewTimer", this, new BMessage('TIMR'));
 
 fFileTypes = new RHTMLFileTypes(ft,this);
 
 MakeFocus(true);
 SetDoesUndo(true);
 SetStylable(true);

 rgb_color fekete={0,0,0};

 SetFontAndColor(fFont,B_FONT_ALL,&fekete);

 fTagMenu= new RHTMLTagMenu(this);
 fTagMenu->Show();
 fTagMenu->Activate(false);
// fTagMenu->Hide();
 Window()->Activate(true);
 MakeFocus(true);

 fTimer = new RTimer("PopUpTimer", this, new BMessage('PPOP'));
 }
示例#2
0
InputTextView::InputTextView(BRect frame, const char* name, BRect textRect,
	uint32 resizingMode, uint32 flags)
	:
	BTextView(frame, name, textRect, resizingMode, flags),
	fWasFocus(false)
{
	SetWordWrap(false);
}
示例#3
0
//******************************************************************************************************
//**** TextEntryAlertTextEntryView
//******************************************************************************************************
TextEntryAlertTextEntryView::TextEntryAlertTextEntryView(BRect frame, bool multi_line)
: BTextView(frame,NULL,frame.OffsetToCopy(0,0).InsetByCopy(c_text_margin,c_text_margin),
	multi_line?B_FOLLOW_ALL_SIDES:B_FOLLOW_LEFT_RIGHT,B_WILL_DRAW|B_NAVIGABLE)
{
	m_tab_allowed = false;
	m_multi_line = multi_line;
	SetViewColor( ui_color( B_DOCUMENT_BACKGROUND_COLOR));
	SetWordWrap(true);
}
示例#4
0
TEdit::TEdit(const char *name,BRect AFrame,BRect ATextFrame) : BTextView(AFrame, name, ATextFrame, B_FOLLOW_ALL_SIDES,B_WILL_DRAW | B_PULSE_NEEDED)
{
	FTarget = NULL;
	SetModified(false);	
	SetWordWrap(false);	
	SetDoesUndo(true);
	MakeFocus(true);
	
//	SetWordWrap(true);	
	
}
示例#5
0
wxLayoutWindow::wxLayoutWindow(wxWindow *parent)
              : wxScrolledWindow(parent, wxID_ANY,
                                 wxDefaultPosition, wxDefaultSize,
                                 wxHSCROLL | wxVSCROLL |
                                 wxBORDER |
                                 wxWANTS_CHARS),
                m_llist(NULL)
{
#if wxUSE_STATUSBAR
    SetStatusBar(NULL); // don't use statusbar
#endif // wxUSE_STATUSBAR
    m_Editable = false;
    m_doSendEvents = false;
    m_ViewStartX = 0; m_ViewStartY = 0;
    m_DoPopupMenu = true;
    m_PopupMenu = MakeFormatMenu();
    m_memDC = new wxMemoryDC;
    m_bitmap = new wxBitmap(4,4);
    m_bitmapSize = wxPoint(4,4);
    m_llist = new wxLayoutList();
    m_BGbitmap = NULL;
    m_ScrollToCursor = false;
#ifndef __WXMSW__
    m_FocusFollowMode = false;
#endif
    SetWordWrap(false);
    SetWrapMargin(0);

    // no scrollbars initially
    m_hasHScrollbar =
    m_hasVScrollbar = false;

    m_Selecting = false;

#ifdef WXLAYOUT_USE_CARET
    // FIXME cursor size shouldn't be hardcoded
    wxCaret *caret = new wxCaret(this, 2, 20);
    SetCaret(caret);
    m_llist->SetCaret(caret);
#endif // WXLAYOUT_USE_CARET

    m_HaveFocus = false;
    m_HandCursor = false;
    m_CursorVisibility = -1;
    SetCursor(wxCURSOR_IBEAM);
    SetDirty();

    // at least under Windows, this should be the default behaviour
    m_AutoDeleteSelection = true;
}
示例#6
0
    /*****************************************************************************
    * Constructor
    * DESCRIPTION:
    *****************************************************************************/
    NumberQuantity::NumberQuantity(Component* pParent) : ObserverText( pParent )
    {
      mpNumber = new Number(this);
      mpNumber->SetAlign(GUI_TA_RIGHT);
      mpNumber->SetLeftMargin(0);
      mpNumber->SetWordWrap(false);
      mpQuantity = new Quantity(this);
      mpQuantity->SetAlign(GUI_TA_LEFT);
      mpQuantity->SetLeftMargin(1);
      mpQuantity->SetWordWrap(false);
      SetWordWrap(false);

      mHideOnNeverAvailable = false;
    }
示例#7
0
void 
EditorFont::FormatEditor(HWND hwndedit, wyBool fromini, 
                         wyString &keys, wyString &funcs)
{
	//SetFont(hwndedit, "HistoryFont", fromini);

	SetLexerWords(hwndedit, keys, funcs);

	SetLexerWordsStyles(hwndedit);

	SetColor(hwndedit, fromini);
	
	SetCase(hwndedit);

	SetWordWrap(hwndedit);
}
示例#8
0
void CLCDScrollingText::SetScrollDirection(eSCROLL_DIR eScrollDir)
{
    m_eScrollDir = eScrollDir;
    SetWordWrap(eScrollDir == SCROLL_VERT);
    ResetUpdate();
}
示例#9
0
void CPadView::OnWordWrap()
{
	CWaitCursor wait;
	SetWordWrap(!IsWordWrap());
	m_bDefWordWrap = IsWordWrap();
}
MultiLineTextField::MultiLineTextField(BRect frame, const char *name) :
	TextField(frame, name)
{
	SetWordWrap(true);
}