void
CBFileNameDisplay::SetTE
	(
	JXTEBase* te
	)
{
	itsTE = te;

	// this re-orders the list so text editor gets focus

	WantInput(kJFalse);
	WantInput(kJTrue, WantsTab(), kJTrue);
}
CMTextDisplayBase::CMTextDisplayBase
	(
	const Type			type,
	const JBoolean		breakCROnly,
	JXMenuBar*			menuBar,
	JXScrollbarSet*		scrollbarSet,
	JXContainer*		enclosure,
	const HSizingOption	hSizing,
	const VSizingOption	vSizing,
	const JCoordinate	x,
	const JCoordinate	y,
	const JCoordinate	w,
	const JCoordinate	h
	)
	:
	JXTEBase(type, breakCROnly, kJFalse, scrollbarSet,
			 enclosure, hSizing, vSizing, x,y, w,h)
{
	WantInput(kJTrue, kJFalse);

	(scrollbarSet->GetVScrollbar())->SetScrollDelay(0);

	AppendEditMenu(menuBar);

	AdjustFont(this);

	ShouldAllowDragAndDrop(kJTrue);
	SetCharacterInWordFunction(CBMIsCharacterInWord);
	SetPTPrinter(CMGetPTPrinter());
}
void
JXExprEditor::EIPAdjustNeedTab
	(
	const JBoolean needTab
	)
{
	WantInput(kJTrue, needTab);
}
void
GMAccountList::GMAccountListX()
{
	AppendCols(1, kDefColWidth);
	const JSize count	= itsAccountInfo->GetElementCount();
	AppendRows(count, itsLineHeight);
	GetTableSelection().SelectRow(1);
	WantInput(kJFalse);
}
void
JXInputField::SetTable
	(
	JXEditTable* table
	)
{
	assert( itsTable == NULL && table != NULL );

	itsTable = table;
	WantInput(kJTrue, kJTrue);
	SetBorderWidth(1);
}
Beispiel #6
0
JXTextEditor::JXTextEditor
	(
	JXMenuBar*			menuBar,
	JXScrollbarSet*		scrollbarSet,
	JXContainer*		enclosure,
	const HSizingOption	hSizing,
	const VSizingOption	vSizing,
	const JCoordinate	x,
	const JCoordinate	y,
	const JCoordinate	w,
	const JCoordinate	h
	)
	:
	JXTEBase(kFullEditor, kJFalse, kJTrue, scrollbarSet,
			 enclosure, hSizing, vSizing, x,y, w,h)
{
	WantInput(kJTrue, kJTrue);
	ShouldAllowDragAndDrop(kJTrue);
	UseMultipleUndo();
	SetLastSaveLocation();

	(scrollbarSet->GetVScrollbar())->SetScrollDelay(0);

	// add the menus

	itsMenuBar = menuBar;

	AppendEditMenu(menuBar, kJTrue, kJTrue, kJTrue, kJTrue);
	AppendSearchReplaceMenu(menuBar);

	itsFontMenu = new JXFontNameMenu(kFontMenuTitleStr, menuBar,
									 kFixedLeft, kFixedTop, 0,0, 10,10);
	assert( itsFontMenu != NULL );
	menuBar->AppendMenu(itsFontMenu);
	ListenTo(itsFontMenu);

	itsSizeMenu = new JXFontSizeMenu(itsFontMenu, kSizeMenuTitleStr, menuBar,
									 kFixedLeft, kFixedTop, 0,0, 10,10);
	assert( itsSizeMenu != NULL );
	menuBar->AppendMenu(itsSizeMenu);
	ListenTo(itsSizeMenu);

	itsStyleMenu = new JXTEStyleMenu(this, menuBar,
									 kFixedLeft, kFixedTop, 0,0, 10,10);
	assert( itsStyleMenu != NULL );
	menuBar->AppendMenu(itsStyleMenu);

	// listen for TypeChanged

	ListenTo(this);
}
CMLineIndexTable::CMLineIndexTable
	(
	JOrderedSetT::CompareResult (*bpCcompareFn)(CMBreakpoint *const &, CMBreakpoint *const &),

	CMSourceDirector*	dir,
	CMSourceText*		text,
	JXScrollbarSet*		scrollbarSet,
	JXContainer*		enclosure,
	const HSizingOption	hSizing,
	const VSizingOption	vSizing,
	const JCoordinate	x,
	const JCoordinate	y,
	const JCoordinate	w,
	const JCoordinate	h
	)
	:
	JXTable(1, 1, NULL, enclosure, hSizing, vSizing, x, y, w, h),
	itsDirector(dir),
	itsText(text),
	itsVScrollbar(scrollbarSet->GetVScrollbar()),
	itsCurrentLineIndex(0),
	itsLineMenu(NULL),
	itsDeselectTask(NULL)
{
	itsLink = CMGetLink();
	ListenTo(itsLink);

	itsBPList = jnew JPtrArray<CMBreakpoint>(JPtrArrayT::kForgetAll);
	assert(itsBPList != NULL);
	itsBPList->SetCompareFunction(bpCcompareFn);
	itsBPList->SetSortOrder(JOrderedSetT::kSortAscending);

	WantInput(kJFalse);
	SetBackColor(CMGetPrefsManager()->GetColor(CMPrefsManager::kBackColorIndex));
	SetFocusColor(GetBackColor());
	SetRowBorderInfo(0, GetBackColor());
	SetColBorderInfo(0, GetBackColor());
	SetDrawOrder(kDrawByCol);

	AppendCols(3);

	CMAdjustLineTableToTextTask* task = jnew CMAdjustLineTableToTextTask(this);
	assert( task != NULL );
	task->Go();

	ListenTo(itsText);
	ListenTo(itsVScrollbar);
	ListenTo(itsLink->GetBreakpointManager());
}
JXRowHeaderWidget::JXRowHeaderWidget
	(
	JXTable*			table,
	JXScrollbarSet*		scrollbarSet,
	JXContainer*		enclosure,
	const HSizingOption	hSizing,
	const VSizingOption	vSizing,
	const JCoordinate	x,
	const JCoordinate	y,
	const JCoordinate	w,
	const JCoordinate	h
	)
	:
	JXEditTable(1,w, NULL, enclosure, hSizing,vSizing, x,y, w,h)
{
	assert( table != NULL && scrollbarSet != NULL );

	itsTable = table;
	itsTable->SetRowHeader(this);
	ListenTo(itsTable);

	itsVScrollbar = scrollbarSet->GetVScrollbar();
	ListenTo(itsVScrollbar);

	itsTitles = NULL;

	itsAllowRowResizingFlag = kJFalse;
	itsMinRowHeight         = 1;
	itsHMarginWidth         = 2*kCellFrameWidth;
	itsMaxBcastWidth        = 0;

	itsDragType = kInvalidDrag;

	itsDragLineCursor    = JXGetDragHorizLineCursor(GetDisplay());
	itsDragAllLineCursor = JXGetDragAllHorizLineCursor(GetDisplay());

	SetColBorderInfo(0, (GetColormap())->GetBlackColor());

	// override JXEditTable

	WantInput(kJFalse);
	SetBackColor((GetColormap())->GetDefaultBackColor());

	AppendCols(1, GetApertureWidth());
	AdjustToTable();
}
JXColHeaderWidget::JXColHeaderWidget
	(
	JXTable*			table,
	JXScrollbarSet*		scrollbarSet,
	JXContainer*		enclosure,
	const HSizingOption	hSizing,
	const VSizingOption	vSizing,
	const JCoordinate	x,
	const JCoordinate	y,
	const JCoordinate	w,
	const JCoordinate	h
	)
	:
	JXEditTable(h,1, NULL, enclosure, hSizing,vSizing, x,y, w,h)
{
	assert( table != NULL && scrollbarSet != NULL );

	itsTable = table;
	itsTable->SetColHeader(this);
	ListenTo(itsTable);

	itsHScrollbar = scrollbarSet->GetHScrollbar();
	ListenTo(itsHScrollbar);

	itsTitles = NULL;

	itsAllowColResizingFlag = kJFalse;
	itsMinColWidth          = 1;

	itsDragType = kInvalidDrag;

	itsDragLineCursor    = JXGetDragVertLineCursor(GetDisplay());
	itsDragAllLineCursor = JXGetDragAllVertLineCursor(GetDisplay());

	SetDrawOrder(kDrawByRow);
	SetRowBorderInfo(0, (GetColormap())->GetBlackColor());

	// override JXEditTable

	WantInput(kJFalse);
	SetBackColor((GetColormap())->GetDefaultBackColor());

	AppendRows(1, GetApertureHeight());
	AdjustToTable();
}
void
JXPathInput::Receive
	(
	JBroadcaster*	sender,
	const Message&	message
	)
{
	if (sender == this && message.Is(JTextEditor::kTextSet))
		{
		SetCaretLocation(GetTextLength() + 1);
		}
	else if (sender == this && message.Is(JTextEditor::kCaretLocationChanged))
		{
		JIndex i;
		WantInput(kJTrue,
				  JI2B(GetCaretLocation(&i) && i == GetTextLength()+1),
				  WantsModifiedTab());
		}

	JXInputField::Receive(sender, message);
}
Beispiel #11
0
JXEditTable::JXEditTable
	(
	const JCoordinate	defRowHeight,
	const JCoordinate	defColWidth,
	JXScrollbarSet*		scrollbarSet,
	JXContainer*		enclosure,
	const HSizingOption	hSizing,
	const VSizingOption	vSizing,
	const JCoordinate	x,
	const JCoordinate	y,
	const JCoordinate	w,
	const JCoordinate	h
	)
	:
	JXTable(defRowHeight, defColWidth, scrollbarSet,
			enclosure, hSizing, vSizing, x,y, w,h)
{
	itsInputField      = NULL;
	itsEditMenuHandler = NULL;
	WantInput(kJTrue, kJTrue, kJTrue);		// tab/shift-tab moves to next/previous column
	SetBackColor(GetFocusColor());	// remain white when input has focus
}
void
GMFilterNameTable::GMFilterNameTableX()
{
	AppendCols(1, kDefColWidth);
	AdjustColWidths();

	const JFontManager* fm	= GetFontManager();
	itsRowHeight	=
		fm->GetLineHeight(JGetDefaultFontName(), kJDefaultFontSize,
						JFontStyle()) + kRowHeightAdjust;

	const JSize count = itsFilters->GetElementCount();
	AppendRows(count, itsRowHeight);

	AdjustButtons();
	WantInput(kJFalse);

	ListenTo(itsNewButton);
	ListenTo(itsRemoveButton);

	const Atom dndName	= GetDNDManager()->GetDNDSelectionName();
	GetDisplay()->RegisterXAtom(kDragFilterXAtomName);
}