Commit Graph
6262 Commits
Author SHA1 Message Date
David Richardson 5449561fe2 Clear _CPFontPanelPreviewView build warning
CPFontPanel.j used _CPFontPanelPreviewView as an ivar type and instantiated it before its own @implementation, later in the same file, with no forward declaration. Added @class _CPFontPanelPreviewView, alongside the file's existing forward declarations.

This removes all build warnings.
2026-08-20 20:14:14 -06:00
David Richardson 6121caf75d Remove CPTabStopType build warning
CPParagraphStyle.j defined CPTabStopType's four constants directly, with a comment noting they were "missing" but no @typedef for the type itself.

_CPRTFParser.j uses CPTabStopType as an ivar type and imports CPParagraphStyle.j directly, so the fix belongs in the defining file.

Added the missing @typedef CPTabStopType, same pattern as CPRulerOrientation.
2026-08-20 20:05:38 -06:00
David Richardson 533a1d46eb Address CPRulerOrientation build warning
CPRulerView.j declared CPRulerOrientation's constants directly,
with only a comment claiming it was a typedef.

No @typedef directive existed, so the type was unknown wherever used as an ivar or parameter type.

Added the missing @typedef CPRulerOrientation, matching the pattern already used for CPTextAlignment in CPText.j.
2026-08-20 19:57:35 -06:00
David Richardson 52658b636a Add missing CPTextTab forward declaration in CPRulerView
CPRulerView.j referenced CPTextTab (isKindOfClass: and alloc/init) without a declaration.

Added @class CPTextTab; to resolve the symbol reference. A forward declaration was utilized rather than importing CPParagraphStyle.j to minimize dependency coupling, despite the absence of a circular import risk.

Resolves build warning.
2026-08-20 16:28:02 -06:00
David Richardson a1ac821678 Fix build warnings in _CPTableTextAttachment
Replaced the CPTextView.j import with forward declarations for CPTextView and CPTextContainer (the latter previously reached via the removed import).

The previous import graph created a circular dependency (_CPTableTextAttachment.j -> CPTextView.j -> _CPRTFParser.j / _CPRTFProducer.j -> _CPTableTextAttachment.j).

This caused the legacy compiler to emit a class registration warning during clean builds, as the class was unregistered at the time of resolution. Incremental builds masked this warning via cached symbol tables.

Using forward declarations breaks the cycle and ensures warning-free clean and incremental builds.
2026-08-20 15:31:45 -06:00
David Richardson 78a0ebab6e Remove CPScrollView build warning
CPRulerView.j did not import CPScrollView.
A direct import would create a cycle, since CPScrollView.j already imports CPRulerView.j.
Added a forward declaration instead.
2026-08-19 20:23:33 -06:00
David Richardson ac8ce3eec3 Fix CPOutlineView build warnings and audit+improve CPTreeNode
CPOutlineView.j used CPTreeNode before AppKit.j imported it. This
triggered build warnings. This commit adds an import.

- Add @import "CPTreeNode.j" to CPOutlineView.j.

While addressing this warning, CPTreeNode was audited and found to have an algorithmic complexity regression and multiple structural inconsistencies in the KVO support code.

The test suite for CPTreeNode was Spartan in the extreme.

All of these have been addressed - see inline notes for details.
CPTreeNode is subject to further audit.
2026-08-19 10:11:20 -06:00
David Richardson 01f7f9b601 Fix CPStackView compile errors and add minimal correctness fixes
CPStackView.j emited warnings during builds and tests which constituted
either real errors or indeterminate state.

These included four types that did not exist: CPUserInterfaceLayoutOrientation, CPLayoutAttribute,
CPEdgeInsets, and CPMapTable.

The missing types are now present.

- Add local typedefs for CPUserInterfaceLayoutOrientation and
  CPLayoutAttribute. Numeric values match the equivalent Cocoa
  constants.
- Add CPEdgeInsets as an alias for the existing CGInset struct.
  Add CPEdgeInsetsMake and CPEdgeInsetsEqualToEdgeInsets.
- Import Foundation/CPMapTable.j. CPMapTable already exists in
  Foundation.

This commit also fixes two logic errors found during review.

- arrangedSubviews did not match the true view order after
  insert or remove. Add _rebuildArrangedSubviews and call it
  from every method that changes view order.
- Trailing-gravity layout added one extra spacing gap past the
  last view. This shifted the returned layout boundary. Spacing
  is now added before each view, not after.

This commit adds one new property.

- Add a distribution property with storage and accessors. It
  has no effect on layout yet. This makes the property honest:
  before this change, the type existed but no property did.

The manual test, ./Tests/Manual/CPStackViewTest, used a Narwhal-era
Jakefile and would not build. This has been updated to reflect
usage under the Node toolchain.

This commit adds CPStackView.j to AppKit.j. The file was never
imported. Only the build script's wildcard file list included
it.

This commit adds a header comment to CPStackView.j. The comment
states that the class is a placeholder. It lists known
limitations. It states that a constraint-solver based
replacement is planned.

Why: CPStackView must compile and pass tests before capp-build
can use this tree as a build reference, and a class with unstated
limits invites misuse.
2026-08-14 20:09:17 -06:00
daboe01 ce2803f354 replace unload event listener with pagehide and add DOM safety checks 2026-08-12 16:58:12 +02:00
David Richardson b62721d79a Remove _IS_NUMERIC macro in favor of concrete funtion CPIsNumeric()
- Create Foundation/_CPFoundationUtilities.j to house global low-level utilities.
- Implement CPIsNumeric as a concrete JavaScript function, preserving the exact legacy logic.
- Import _CPFoundationUtilities.j in the Foundation.j umbrella manifest.
- Replace _IS_NUMERIC macro calls at all call sites with CPIsNumeric().
2026-08-05 13:47:28 -06:00
David Richardson 1a9a42ff54 Replace #pragma mark with // MARK:
Replace objc directive with native Javascript version // MARK: to facilitate elimination of preproccsing pass.
2026-07-21 15:15:53 -06:00
daboe01 04bad947e3 fixed: CPRuleEditor: crash when dragging nested compound rows 2026-07-10 16:14:29 +02:00
daboe01 429dfd7467 new: Prefer e.data to capture the exact inserted character(s) from key entry 2026-06-24 16:50:05 +02:00
daboe01 0fed962b37 Fixed: CPLayoutManager false-positive layout rescue on zero-length-delta edits 2026-06-21 17:30:18 +02:00
daboe01andGitHub 535315485a Merge pull request #3235 from daboe01/paste-as-plain-text
New: standard key binding for pasteAsPlainText:
2026-06-20 14:10:49 +02:00
daboe01 c8789c5450 formatting 2026-06-20 12:32:10 +02:00
daboe01 766035f4b7 Fixed: baseline alignment in _CPLineFragment to prevent overlapping text descenders 2026-06-20 12:06:24 +02:00
daboe01 26b2280fc2 fixed: color spill issue 2026-06-20 10:40:46 +02:00
daboe01 15bbca8d77 fixed: whitespace issue 2026-06-20 10:36:07 +02:00
daboe01 319bcdaba9 fixed: table roundtrip issue 2026-06-19 22:56:38 +02:00
daboe01 89445f94a2 fixed: whitespace before tab 2026-06-19 22:26:52 +02:00
daboe01 beb4aef424 new: heightTracksTextView support in CPTextContainer 2026-06-19 09:47:39 +02:00
daboe01 c187f5de1d fixed: rtf roundtrip with baseline stuff 2026-06-19 08:48:17 +02:00
daboe01 d40a151e05 new: colorpanel sync 2026-06-19 07:18:52 +02:00
daboe01 de2ffd3aad New: implement baseline offsets and superscript/subscript support 2026-06-18 19:08:45 +02:00
daboe01 4c8fd58471 fixed: leaky abstraction 2026-06-17 19:22:36 +02:00
daboe01 873a102872 New: standard key binding for pasteAsPlainText: 2026-06-17 18:24:31 +02:00
daboe01 672f25ce27 New: standard key binding for pasteAsPlainText:
This reverts commit 9731c4b394.
2026-06-17 18:20:39 +02:00
daboe01 9731c4b394 New: standard key binding for pasteAsPlainText: 2026-06-17 18:18:39 +02:00
daboe01 1223cfc965 new: register wheel event listeners as non-passive 2026-06-17 16:10:39 +02:00
daboe01 8de928d905 formatting 2026-06-17 08:07:26 +02:00
daboe01 5a3d6e30cb fixed: table sizing 2026-06-17 07:58:33 +02:00
daboe01 cfff603508 Fixed: CPInvalidArgumentException in CPTextField -setFont: when handling composite theme states 2026-06-16 19:43:45 +02:00
daboe01andGitHub acbe5885f1 Merge branch 'main' into rtf-producer-table-interface 2026-06-16 19:24:10 +02:00
daboe01 a981b8b04d improved: indentation markers 2026-06-16 19:17:44 +02:00
daboe01 d75c0ac452 improved: tab management 2026-06-16 17:28:03 +02:00
daboe01 da061aac1d improved: table generation 2026-06-16 10:30:00 +02:00
daboe01 77433a3a1c fixed: scrolling glitch 2026-06-16 07:16:14 +02:00
daboe01 4aaa32833a fixed: table roundtrip 2026-06-15 22:33:03 +02:00
daboe01 2a0cebb851 improved: rtf roundtrip 2026-06-15 19:42:53 +02:00
daboe01 1b23bb8a67 new: CPMarkdownParser 2026-06-15 16:43:58 +02:00
daboe01 5dc66c5b4e fixed: roundtrip 2026-06-14 22:56:23 +02:00
daboe01 49b1800027 improved: table generation 2026-06-14 22:42:33 +02:00
daboe01 1cad83aba8 initial display of the table 2026-06-14 21:06:51 +02:00
daboe01andGitHub e1f5238063 Merge pull request #3228 from daboe01/textview-dom-fix
removed: dead code
2026-06-13 22:47:30 +02:00
daboe01 5897d76c04 fixed: imports 2026-06-13 22:38:36 +02:00
daboe01 a0fc7723fc new: table support 2026-06-13 22:36:09 +02:00
daboe01andGitHub ec4a1d1724 Merge pull request #3225 from daboe01/textfield-setfontfix
fixed: ensure custom fonts are respected in all states, styles, and CIBs
2026-06-13 22:27:11 +02:00
daboe01 861c504c41 NEW: add native table support via dynamic protocol detection 2026-06-13 19:47:24 +02:00
daboe01 c9df6e4d25 removed: dead code 2026-06-13 19:18:12 +02:00